Welcome to WebmasterWorld Guest from 54.205.20.160

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)

10+ Year Member



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

5+ Year Member



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)

10+ Year Member



it wont work tried that one already.
anyway thanks.

anybody can help me. TY

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

5+ Year Member



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)

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



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

10+ Year Member



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]