Mod_Rewrite: Testing URL got indexed in Google - How do I create a proper 301 redirect?
- by Jonathan Wold
I worked on a website for which I had a "development URL" that looked something like this:
www.domainname.com.php5-9.dfw1-2.websitetestlink.com/
Now, several weeks after the website launch, there is at least one page of content indexed on Google with that URL.
Question: How do I redirect all requests from that test URL to reroute to the actual domain?
So, for instance, I would want:
www.domainname.com.php5-9.dfw1-2.websitetestlink.com/page-name
To go to:
www.domainname.com/page-name
The website is powered by WordPress and hosted on a PHP server. I've experimented with .htaccess without much success.