I'm actually not sure where to start with this one.
Basically I have a buddy in SEO and one of his clients sites has been duplicated by a certain web hosting service and the duplicate has not been removed in spite of turning it off. The preview site in question has a higher PR than the actual client site so SEO is being completely destroyed as a result.
The only control we have managed to get over the situation is the fact that the files (but not the .htaccess) are propagating from the client's server. Basically, it's a freaking nightmare.
What I am proposing to do is set up a conditional redirect in the PHP header files so that if the browser/engine hits the preview site, it will 301 to the client site. If, however, the browser/engine is hitting the correct site, we need to do nothing.
While I could probably figure out the syntax by trial & error, this is sort of time sensitive since the client in question has an SEO campaign that is going straight to Hades.
I'm hoping someone here will know how to format the conditional redirect.
Let's call the two domains:
previewdomain.com domain.com
So loosely speaking...
if current url == previewdomain.com then 301 redirect to domain.com
else do nothing
Thanks for the assist!