I know there a million other posts like this but this ones a bit specific.
Basically I have an old site that has been dead, just made it live again and theres still a few old links in Google. I want to do something in the htaccess that will 302 redirect ALL pages and the site to my new domain. for example I need:
http://www.oldsite.com > http://www.newsite.co.uk
oldsite.com > http://www.newsite.co.uk
http://www.oldsite.com/?color=red > http://www.newsite.co.uk
http://www.oldsite.com/?color=red&size=large > http://www.newsite.co.uk
http://www.oldsite.com/page > http://www.newsite.co.uk
http://www.oldsite.com/something.html > http://www.newsite.co.uk
Any idea how to do this?
You’re right that a .htaccess file is the answer.
As you want to redirect everything, no
RewriteCondrequired.Believe you’ll want it 301’ed though if you want Google to follow these
Edit: Have added ? to the end of the domain to redirect to. This will remove the current query string.