Forum Moderators: phranque
I am moving a site from domain1.com to domain2.com. The site will be identical, same paths, etc, the problem is domain1.com has some nice inbound links to want to maintain maximum google juice.
So how would I create a .htaccess to redirect visitors & bots from domain1.com/*.* to domain2.com/*.*?
Cheers,
Mark
But if you need to all you have to do is 301 all the files. You can set up the htacces so that it sends any request to domain1 to domain2 with the same path.
This makes it easy. On the server for the old domain, place the following line in a plain-text file named ".htaccess" in the top-level Web-accesible directory (where the site's "home page" is currently located):
Redirect 301 / http://www.newdomain.com/
After testing, you may remove all of your files from the old server, since they will no longer be accessible. The effect will be immediate, but you will need to flush your browser cache before testing to get valid results.
Jim