A workaround for a single country
-
I have had an issue recently: iQBC was competing for priority with one of my caching plugins, resulting in frequent false positives (i.e. people from non-blocked countries were getting the “Not available in your country” error message from the cache).
The quick solution is – of course – to deactivate either caching or iQBC but that’s just hiding the problem not solving it.
The real solution is to use .htacess file to block all IP subnets of the country we want to block. In my case it was just one country (China, spammers knocking my door every 3-4 seconds, very annoying).
There is a website that can generate the relevant section of .htaccess for you – just copy and paste it at the very end of your blog’s .htaccess file and you are done. No more issues with visitors from that country and no more problems with the caching plugin.
The website is https://www.ip2location.com/free/visitor-blocker
I have been using this method for a couple of days now and I am extremely happy with it. Removed iQBC plugin from my WP.
- The topic ‘A workaround for a single country’ is closed to new replies.