Sitepoint Members,
Is
RewriteCond %{HTTP_HOST} ^xyz.com
RewriteRule ^(.*)$ http://www.xyz.com/$1 [r=301,L]
still the best way to handle the www, as opposed to a 301 redirect?
No. Use
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^xyz\.com [NC]
RewriteRule .? http://www.xyz.com%{REQUEST_URI} [R=301,L]
as explained in my signature's tutorial.
Do you think I should redirect to www or redirect to no www. I think I'm going to redirect to No www, it's a cleaner look, "www" is not so new anymore.
I, too, prefer non-www but that's in the tutorial article, too.
If so, then I would have to use:
RewriteCond %{HTTP_HOST} ^
www.xyz.com
RewriteRule ^(.*)$ http://xyz.com/$1 [r=301,L]
right?
No. Pretty much as above.
Thanks,
Chris
Bookmarks