For your information, the Rewrite Rule I am using is the following:
RewriteCond %{HTTP_HOST} r00tb0x.com [NC] RewriteCond %{HTTP_USER_AGENT} .*(Googlebot|Bingbot).* RewriteRule (.*) http://www.jamesattard.com [R=301]
Notice the two chained rewrite conditional statements which have an effect only on Google and Bing bots. To test that this redirection is working on bots but not on humans, I used curl as illustrated in a previous post:
ivory:~ user$ curl -A "Googlebot" r00tb0x.com <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://www.jamesattard.com">here</a>.</p> </body></html>
ivory:~ user$ curl r00tb0x.com <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://www.r00tb0x.com/">here</a>.</p> </body></html>
No comments:
Post a Comment