homepage Welcome to WebmasterWorld Guest from 54.227.34.0
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

    
block spammers using proxies?
jackvull

5+ Year Member



 
Msg#: 4451068 posted 3:55 pm on May 8, 2012 (gmt 0)

I have a spammer on my site from Africa so I block restricted IP access from that country and a number of other countries.
However, the same guy then went through another proxy in an allowed country to create an account.
The large majority of legitimate users on my site come from home broadband connections where a proxy is not in use.
So, I wondered if I could block proxy access.
How do I build this into my current htaccess?

new code
# BLOCK PROXY VISITS
# PerishablePress.com: [bit.ly...]
<ifModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule .* - [F]
</ifModule>

current code
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.mysite\.co\.uk)?$
RewriteCond $1 !^cart/updateorders\.php$
RewriteCond $1 !^IntegrityCheck\.php$
RewriteRule ^(.*)$ [mysite.co.uk...] [R=301,L]

I also want to allow access from my own proxy server, so how do I turn off rewrite if it's a proxy I know?

Also, will this block googlebot or will it get around it?

 

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