[BlueOnyx:06092] Re: rewrite rule

Darrell D. Mobley dmobley at uhostme.com
Sun Dec 12 22:47:04 -05 2010


> -----Original Message-----
> From: blueonyx-bounces at blueonyx.it [mailto:blueonyx-bounces at blueonyx.it]
> On Behalf Of Darrell D. Mobley
> Sent: Wednesday, October 27, 2010 10:25 AM
> To: 'BlueOnyx General Mailing List'
> Subject: [BlueOnyx:05648] Re: rewrite rule
> 
> > -----Original Message-----
> > From: Darrell D. Mobley [mailto:dmobley at uhostme.com]
> > Sent: Wednesday, October 27, 2010 10:18 AM
> > To: 'BlueOnyx General Mailing List'
> > Subject: RE: [BlueOnyx:05624] Re: rewrite rule
> >
> > > -----Original Message-----
> > > From: blueonyx-bounces at blueonyx.it [mailto:blueonyx-
> bounces at blueonyx.it]
> > > On Behalf Of Tjerk Hacquebord
> > > Sent: Friday, October 22, 2010 9:45 AM
> > > To: 'BlueOnyx General Mailing List'
> > > Subject: [BlueOnyx:05624] Re: rewrite rule
> > >
> > > So this is the new standard??
> > > Please make us able to change it back to the redirect like it used to
> > > be or selectable per site.
> >
> > I have yet to see an official answer as to whether or not this was going
> > to be the new default behavior for BlueOnyx software.  Like you, I would
> > like to know, so that I can make arrangements on my own servers to
> > manually edit the httpd configurations for each new site to behave as
> > before.
> >
> > Can anyone, Michael, others, answer this question?
> 
> Hmmm, I just looked at one of the more recently created sites on my server
> and it seems to be redirecting as before. Maybe it has already been
> changed back?

Hold on a second...

Well, I just edited an account's domain name and the GUI added that dreaded
non-www-redirect rule when it wasn't there originally.  When I first set the
domain up on a development domain to build the site out, the code looked
like this:

<VirtualHost xxx.xx.xxx.xxx:80>
ServerName siteXX.uhostme.com
ServerAdmin admin
DocumentRoot /home/.sites/132/siteX/web
ErrorDocument 401 /error/401-authorization.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-file-not-found.html
ErrorDocument 500 /error/500-internal-server-error.html
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^xxx.xx.xxx.xxx(:80)?$
RewriteCond %{HTTP_HOST}                !^siteXX.uhostme.com(:80)?$ [NC]
RewriteRule ^/(.*)                      http://siteXX.uhostme.com/$1
[L,R=301]

When the site was ready to go live, I edited the domain name for the site
and this is what I got:

<VirtualHost xxx.xx.xxxx.xxx:80>
ServerName www.domainname.com
ServerAlias domainname.com
ServerAdmin admin
DocumentRoot /home/.sites/132/siteXX/web
ErrorDocument 401 /error/401-authorization.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-file-not-found.html
ErrorDocument 500 /error/500-internal-server-error.html
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^xxx.xx.xxx.xxx(:80)?$
RewriteCond %{HTTP_HOST}                !^www.domainname.com(:80)?$ [NC]
RewriteCond %{HTTP_HOST}                !^domainname.com(:80)?$ [NC]
RewriteRule ^/(.*)                      http://www.domainname.com/$1
[L,R=301]

I tried removing the server alias to see if that would make that bad
non-redirect rule go away, but it didn't have any affect.  It sure would be
good to know *when* this thing is going to show up and when it isn't going
to show up so I wouldn't have to manually check the http configuration files
every time a site is created or edited.




More information about the Blueonyx mailing list