Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Apache Cloaking to switch spider from production server

Any comments on Apache configurations with mod_rewrite please.



7:57 pm on Sep 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Hi, I've just noticed my production domain popped into google. What is the best way to avoid this, and is cloakign in this instance accurate?

I'm currently experimenting with this config:

RewriteCond %{HTTP_USER_AGENT} Googlebot/2.1
RewriteRule ^/?(.*) [domain.com...] [R=301,L]

RewriteRule ^/(index\.htag/)?([^.]+)$ /index.htag/$2 [L]

This is on my production server domain. So for me going to www.productiondomain.com should work as usual, applying the last RewriteRule above. But when googlebot arrives, it should send him straight to the live server and avoid in-index doplication.

Somehow it's cloaking but not really, as th econtent is mostly the same.

Also it leaves me free to send people to the production server and show them new material.

Also it should leave other spiders alone, such as th eadSense bot and my site search engine bot.

Does this look ok? I checked the headers with the header checker and it seems ok, but without beeing bgooglebot its hard to be sure.




8:59 pm on Sep 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Hmm somebody must be interested in mod_rewrite... please?



11:06 pm on Sep 6, 2003 (gmt 0)

10+ Year Member

Have you tried using Wannabrowser? You can change the User Agent there.


12:32 pm on Sep 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Thanks guys, it seems to work fine liek this.



Featured Threads

Hot Threads This Week

Hot Threads This Month