Block certain country using .htaccess -


is there simple , reliable way block countries using .htaccess?

simple means no ip range block lists - need updated once in while , can quite long.

i understand, wouldn't apply proxies.

easiest using geoip apache module. after installing , configuring need in htaccess file:

geoipenable on geoipdbfile /path/to/geoip.dat  setenvif geoip_country_code cn blockcountry setenvif geoip_country_code ru blockcountry # ... place more countries here  deny env=blockcountry 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -