block country

Hello, i believe anybody here have a htaccess code for block all country except US,

i always see a website that said, if you’re not in US then you are blocked.

I have geoip installed in my host, using cpanel

but i just see people posting block ip range, i want to block whole world except the one coming from US

Vidan:



I quite literally posted that here in these forums last night! :smiley:



To avoid being redundant, just check my last couple of posts since yesterday …



You can use the exact same code to do a whitelist, just simply reverse

the default “Allow,Deny” and change the “DenyCountry” and “DenyContinent”

to “AllowCountry” and “AllowContinent” … IE: flip flop the same code.

ok close this topic.

To make it easier to find in the future, this is the post referenced by Spiral:

[url]http://forum.cs-cart.com/showpost.php?p=72537&postcount=27[/url]



Bob

GEOIP is good but there is one problem one time my customer called located in US and wanted to access my web site I have that same GEOIP enable but they were getting a block message because they were trying to access my web site from their cell phone

[quote name=‘tigerbabba’]GEOIP is good but there is one problem one time my customer called located in US and wanted to access my web site I have that same GEOIP enable but they were getting a block message because they were trying to access my web site from their cell phone[/QUOTE]

GEOIP is extremely accurate (especially so in the paid version) so what you speak of

would be the exception and not the rule and only in the rarest of instances.



For those, you might whitelist the CIDR ranges of those providers as you find them or

if your server can handle the increased loads resolving names, the domain.