Once again, the "canonical" problem. I haven't gotten it right yet. I would like to redirect ALL my files on one domain, from non-www to www. Is this htaccess redirect correct? redirect 301 / http://www.mydomainname.com/ I have seen about 5 versions of this, and I want to use the correct one. I copied some mod rewrite code before (gibberish to me), and it blew everything up, so I removed it immediately. I am not a programmer, just an HTML plodder. I know this should be simple, but not for me. I did the "fix" at Google, but what about the other engines? Thank you for your help. UPDATE: I tried the code out, and this was the result - "The page isn't redirecting properly" "Firefox has detected that the server is redirecting the request for this address in a way that will never complete.", and "This problem can sometimes be caused by disabling or refusing to accept cookies." I have never disabled my cookies. So, I immediately removed the htaccess file, since I cannot afford to have my pages not loading. Any ideas? I will work with my provider later today, after the traffic dies down.
RewriteEngine on RewriteCond %{HTTP_HOST} ^[b]yourdomain[/b]\[b].com[/b]$ [NC] RewriteRule ^(.*)$ [b]http://www.yourdomain.com/[/b]$1 [R=301,L] Code (markup): Replace yourdomain with your domain name, leave the \ in the top part of the code.