Restrict country XY and allow all others
This snippet will restrict one country, or more and all other countries are allowed over .htaccess file.
GeoIPEnable On SetEnvIf GEOIP_COUNTRY_CODE XY DenyCountry SetEnvIf GEOIP_COUNTRY_CODE XZ DenyCountry Order Allow,Deny Allow from all Deny from env=DenyCountry
And now opposite: allow only chosen countries:
GeoIPEnable On SetEnvIf GEOIP_COUNTRY_CODE XY AllowCountry SetEnvIf GEOIP_COUNTRY_CODE XZ AllowCountry Order Deny,Allow Deny from all Allow from env=AllowCountry
Milan is a web designer & developer and stock photographer. He also has over 20 years experience with hardware and software computer servicing for individuals, and small & middle-size companies, read more…