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 -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -