Forum Moderators: phranque
Is one better than another?
RewriteCond %{HTTP_HOST}!^www\.sitename\.com [NC]
RewriteRule ^(.*)$ [sitename.com...] [R=301,L]
RewriteCond %{HTTP_HOST} ^sitename\.com [NC]
RewriteRule ^(.*) [sitename.com...] [R=301,L]
Also, is it wise to redirect /index.html to /?
I never link to /index.html, /main.htm, default.shtml, or /index.php, and always install a redirect to correct any attempt by other sites to do so, just as I do for non-canonical domain requests. An ounce of prevention on a new site is easily worth a pound of cure.
Jim