I want to block a country which brings just hackers or thieves to my site and no real sales. I know they will try to use proxies - how can I block them or at least make it as difficult as possible to access my sites?
How to block access from proxy sites?
Collapse
X
-
you would lose legit traffic as well by blocking proxies, use geoip to block bad countries or a free cloudflare account to block known bad users
“Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. If we continue to develop our technology without wisdom or prudence, our servant may prove to be our executioner.” ― Omar Bradley (1948) -
http://www.wpreads.com/2013/03/block...ess-sites.html
Basically you add this to your .htaccess file
And if you're using Wordpress you add this as the first line in your header fileCode:<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>
Haven't tested it myself but you might want to give that a shotCode:<?php if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1)) die("Proxy access not allowed"); ?>Last edited by Fetish Gimp; 04-24-2013, 11:05 PM.Strapon Seduction - femdom blog | TwitterComment
-
I use geoip and strongbox to block countries where a high level of fraud and file sharing originated.
Losing a handful of possible legit sales is worth it for less headache!---------------------------------------------------------
Webmaster of www.kinkykicks.net - Your 1 stop resource for ballbusting and cruel sexual femdom.
Join our affiliate program at www.cash4kicks.comComment

Comment