Welcome to WebmasterWorld Guest from 54.162.129.32

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess, blocking online translation

forbid google.com/translate and bable.altavista.com and etc

     
5:44 am on Dec 7, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 6, 2004
posts:63
votes: 0


how do we code this in .htaccess to forbid online translation of my website. thanks
5:59 am on Dec 7, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 17, 2005
posts:432
votes: 0


Make sure you test first, I may be wrong!

RewriteEngine On

#If referrer contains babelfish
#Send 403 forbiden

RewriteCond %(HTTP_REFERER) (babelfish) [NC]
RewriteRule .* - F

7:01 am on Dec 7, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 6, 2004
posts:63
votes: 0


it wont work tried that one already.
anyway thanks.

anybody can help me. TY

7:38 am on Dec 7, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 17, 2005
posts:432
votes: 0


Whats the referer string in the logs?
Noticed google used http ://ip/translate_c
Just use whatever the referer is.
12:02 pm on Dec 7, 2006 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10551
votes: 10


i thought it might be useful to refer to this similar/simultaneous thread:
[webmasterworld.com...]
2:18 pm on Dec 7, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 6, 2004
posts:63
votes: 0


my solution:

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{HTTP_USER_AGENT} ^ETS [OR]
RewriteCond %{HTTP_USER_AGENT} "translate.google.com" [OR]
RewriteCond %{HTTP_REFERER} babelfish.altavista\.com [OR]

RewriteRule /*$ [yahoo.com...] [L,R]