PDA

View Full Version : Blocking Users From Using Proxies


HUMMERh3
01-30-2009, 11:23 PM
I wanted to block users from accessing my forum who are using proxies.
Someone suggested I add the code below into my .htaccess file. Anyone have any thoughts if this will work?


# block proxy servers from site access

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]
Forward

Dismounted
01-31-2009, 02:45 AM
You'd probably block a whole lot of "proper" users as well. Many legitimate users are behind proxies in public places/work/school/etc. and those would all be blocked. Is there any specific reason why you need to block them?