Hey guys, I have read alot that you should always pick one or the other when it comes to www.yoursite.com or yoursite.com I have decided to go with the www. however, my question is how do I 301 the non www. url to goto the www. url? I read that you can do it via .htaccess but I havn't been able to actually find out how to do it. Any help would be greatly appreciated!
Look here : http://forums.digitalpoint.com/showthread.php?t=184337&highlight=301+redirect+htaccess and here : http://forums.digitalpoint.com/showthread.php?t=23044&highlight=301+redirect+htaccess
This is how I did it and it did it took and update for the PR to transfer ... Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^yoursite\.com RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=permanent,L]
Works great guys, Thanks for the help. Now...Another Question (Sorry total newb when it comes to .htaccess) For example, my site is www.domain.com Thanks to you guys domain.com now goes to www.domain.com However, what if I want www.domain.com/index.html to goto www.domain.com? Thanks in advance guys!
Can anyone help me at all with this? I would greatly appreciate it. I have been trying to find it on the internet, but I'm just not getting it right for some reason.