Blocage de l’accès pour certains pays

Skip to main content
Du bist hier:
Drucken

Blocage de l’accès pour certains pays

Vous voulez partager un dossier uniquement pour certains pays (DACH) et bloquer tous les autres pays ?

  1. Créez le fichier .htaccess dans le dossier désiré
  2. Ajoutez le contenu suivant au fichier .htaccess
    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. Avec notre outil MaxMind GEOIP, vous pouvez ajouter ou supprimer d’autres pays et adapter le fichier à vos souhaits.

 

Veuillez noter que nous mettons à jour la base de données des adresses IP chaque nuit.

Related Post