Blocking access for certain countries

Support Wissensdatenbank

Du bist hier:

You want to share a folder only for certain countries (DACH) and block all other countries?

  1. Create the file .htaccess in the desired folder
  2. Add the following content to the .htaccess file
    GeoIPEnable On
    
    # Put countries to allow here
    SetEnvIf GEOIP_COUNTRY_CODE CH AllowCountry
    SetEnvIf GEOIP_COUNTRY_CODE DE AllowCountry
    SetEnvIf GEOIP_COUNTRY_CODE AT AllowCountry
    SetEnvIf GEOIP_COUNTRY_CODE LI AllowCountry
    Deny from all
    Allow from env=AllowCountry
    
  3. With our MaxMind GEOIP tool you can add or remove further countries and adapt the file to your wishes..
War dieser Artikel hilfreich?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
Wie können wir diesen Artikel verbessern?
Brauchst du Hilfe?
Related Post