Hi, I've got an old website (lets say www.123.com) and I want to move it to my new website (www.456.com). The old website has about 10 pages, and I want to keep the search engine ranking that it has. What I've done is upload a .htaccess file to 123.com with the following lines: It seems to work as when I go to www.123.com/index.html it takes me to www.456.com but if I go to www.123.com (without the index extension) it doesn't redirect me, I'm not sure why. How can I set it up to redirect from my homepage to the new homepage? Thanks for any help
The only rule you really need is: RewriteCond %{HTTP_HOST} !^456\.com$ RewriteRule ^(.*) http://456.com/$1 [R=301,L] Code (markup): or RewriteCond %{HTTP_HOST} !^www\.456\.com$ RewriteRule ^(.*) http://www.456.com/$1 [R=301,L] Code (markup): To redirect everything that does not have 456.com or www.456.com (choose one) to the new address.