homepage Welcome to WebmasterWorld Guest from 54.237.78.165
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
.htaccess, blocking online translation
forbid google.com/translate and bable.altavista.com and etc
steven mheakyle

10+ Year Member



 
Msg#: 3180942 posted 5:44 am on Dec 7, 2006 (gmt 0)

how do we code this in .htaccess to forbid online translation of my website. thanks

 

appi2

5+ Year Member



 
Msg#: 3180942 posted 5:59 am on Dec 7, 2006 (gmt 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

steven mheakyle

10+ Year Member



 
Msg#: 3180942 posted 7:01 am on Dec 7, 2006 (gmt 0)

it wont work tried that one already.
anyway thanks.

anybody can help me. TY

appi2

5+ Year Member



 
Msg#: 3180942 posted 7:38 am on Dec 7, 2006 (gmt 0)

Whats the referer string in the logs?
Noticed google used http ://ip/translate_c
Just use whatever the referer is.

phranque

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



 
Msg#: 3180942 posted 12:02 pm on Dec 7, 2006 (gmt 0)

i thought it might be useful to refer to this similar/simultaneous thread:
[webmasterworld.com...]

steven mheakyle

10+ Year Member



 
Msg#: 3180942 posted 2:18 pm on Dec 7, 2006 (gmt 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]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved