I am essentialy trying to cloak Google certain pages on my site to another. Reason being is i am using this site for paid traffic but i wish to send the SEO traffic elsewhere (via a 301 redirection) as the conversions will be better.
Anyway here is the htaccess i have written so far but i dont know how to add multiple pages.
RewriteEngine On
RewriteCond %{HTTP_HOST} http://www.currentsite.com/ [NC]
RewriteCond %{HTTP_HOST} http://www.currentsite.com/page1 [NC]
RewriteCond %{HTTP_USER_AGENT} Googlebot
RewriteRule ^(.*)$ http://www.newsite.com/ [L,R=301]
RewriteRule ^(.*)$ http://www.newsite.com/page1 [L,R=301]
I assume you can see what i am trying to achieve, redirecting page1 to page1 etc.
Thanks
Morgan
2
Answers
Create a
robots.txt
in your main folder with this content:Find more information here:
https://support.google.com/webmasters/answer/6062608?hl=en http://www.robotstxt.org/robotstxt.html
RewriteCond
work only with the firstRewriteRule
just after. You can use: