block proxy servers by htaccess


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # block proxy servers from site access
  2. # http://perishablepress.com/press/2008/04/20/how-to-block-proxy-servers-via-htaccess/
  3.  
  4. RewriteEngine on
  5. RewriteCond %{HTTP:VIA} !^$ [OR]
  6. RewriteCond %{HTTP:FORWARDED} !^$ [OR]
  7. RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
  8. RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
  9. RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
  10. RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
  11. RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
  12. RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
  13. RewriteRule ^(.*)$ - [F]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.