Reputation: 114
I have two domain seooutlook.info,seooutlook.com both pointing to the same server.
Now since both pointing to the same server,i dont want Google to see Duplicate files at two different domain names.
Till now i managed to redirect seooutlook.info to seooutlook.com
using htaccess
RewriteCond %{HTTP_HOST} ^seooutlook\.info$ [OR]
RewriteCond %{HTTP_HOST} ^www\.seooutlook\.info$
RewriteRule ^/?$ "http\:\/\/www\.seooutlook\.com\/" [R=301,L]
but this fails at situation like this
Example: www.seooutlook.info/site/google.com
it didn't redirect domain to seooutlook.com.
what i want here is to redirect
www.seooutlook.info/site/google.com
to
www.seooutlook.com/site/google.com
There are lots of files like google.com in my server..so what i need here is a universal redirection rule.
and one more thing iam not good at ht-access rules so plz help me with this ..
Thank u :)
Upvotes: 1
Views: 140
Reputation: 7073
You can simply use this code :
RewriteCond %{HTTP_HOST} seooutlook.info$
RewriteRule ^(.*)$ http://www.seooutlook.com/$1 [R=301,L]
Upvotes: 1