anthonyparsons
Mon 12th Oct '09, 3:40am
I was just going through some site updates and found the rewrite conditions I use to block 99% of proxies. It works, and for anyone who wants to take out proxy users without attempting to run thousands of domains or IP's, then feel free to use this if you desire. I do not remember where I got this from, but its not my own and I did get it from another site over a year ago. You may need to test this, it may not be right for you and your setup. I know anyone who uses Frontpage... it will likely cause you an issue. Not sure why anyone does use FrontPage... but no doubts some do. :rolleyes:
So instead of trying to takeout proxy servers by who they are, it is far more efficient to take them out by what they do, being the various HTTP protocols they employ.
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]
May be useful to those trying to reduce spammers upon their sites who surf anonymously (as they typically do).
So instead of trying to takeout proxy servers by who they are, it is far more efficient to take them out by what they do, being the various HTTP protocols they employ.
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]
May be useful to those trying to reduce spammers upon their sites who surf anonymously (as they typically do).