How strong is your server kung fu?

How To Block Proxy Visitors From Your Web Site

How To Block Proxy Visitors From Your Web Site?

If you have access to your .htaccess file, you can add this bit of mod_rewrite code to give proxy visitors a “Forbiden” 403 server response.

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

Written by admin on November 3rd, 2009 with comments disabled.
Read more articles on How To.

Related articles

Comments are closed.