[BlueOnyx:05444] Redirect to www?

Darrell D. Mobley dmobley at uhostme.com
Wed Sep 22 13:47:27 -05 2010


I have an account that I just added that has two domain names associated with it.

Here is the output from the httpd vhost file: 

RewriteEngine on
RewriteCond %{HTTP_HOST}                !^208.77.219.101(:80)?$
RewriteCond %{HTTP_HOST}                !^www.tripolicherryfield.org(:80)?$ [NC]
RewriteCond %{HTTP_HOST}                !^tripolicherryfield.org(:80)?$ [NC]
RewriteCond %{HTTP_HOST}                !^www.pinetreerocketry.org(:80)?$ [NC]
RewriteCond %{HTTP_HOST}                !^pinetreerocketry.org(:80)?$ [NC]

RewriteRule ^/(.*)                      http://www.tripolicherryfield.org/$1 [L,R=301]

However, each site shows up as was entered, either www.tripolicherryfield.org or tripolicherryfield.org or www.pinetreerocketry.org or pinetreerocketry.org. It's like the rewrite rule is being ignored.

Since it is doing this, I added this to the site's .htaccess file:

RewriteCond %{HTTP_HOST} ^pinetreerocketry.org [NC] 
RewriteRule ^(.*)$ http://www.pinetreerocketry.org/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^tripolicherryfield.org [NC] 
RewriteRule ^(.*)$ http://www.tripolicherryfield.org/$1 [L,R=301]

I like that each domain can live on its own, but want the www to be forced.  

But what confused me is, didn't BQ/BX have a part of httpd.com that always forced a www redirect?





More information about the Blueonyx mailing list