I have a indexed test domain, which has duplicated content.
mydomain.com.testdomain.com/<a lot of pages>
and I want to redirect everything to:
www.mydomain.com/<a lot of pages>
so:
mydomain.com.testdomain.com/this/great/page/
to:
www.mydomain.com/this/great/page/
and
mydomain.com.testdomain.com/this/page/
to:
www.mydomain.com/this/page/
etc..
In addition I don't want to redirect the Google webmastertools file.
Will the following work?
RewriteCond %{HTTP_HOST} ^mydomain\.com\.testdomain\.com [NC]
RewriteCond $1 !^googlefile\.html$ [NC]
RewriteRule ^(.*)$ [
mydomain.com...] [R=301,L]
With kind regards,
George