Blokujte přístup z Ruska, Asie, Afriky a Jižní Ameriky. Povolen bude přístup pouze z EU, USA a Google robotů.
# Povolení přístupu pro Google roboty
SetEnvIfNoCase User-Agent "Googlebot" AllowCountry
# Povolení přístupu z EU a USA (ISO kódy zemí)
SetEnvIf GEOIP_COUNTRY_CODE US AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE AT AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE BE AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE BG AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE CY AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE CZ AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE DE AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE DK AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE EE AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE ES AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE FI AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE FR AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE GR AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE HR AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE HU AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE IE AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE IT AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE LT AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE LU AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE LV AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE MT AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE NL AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE PL AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE PT AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE RO AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE SE AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE SI AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE SK AllowCountry
# Blokování přístupu ze všech ostatních zemí
SetEnvIf GEOIP_CONTINENT_CODE AS BlockCountry # Asie
SetEnvIf GEOIP_CONTINENT_CODE AF BlockCountry # Afrika
SetEnvIf GEOIP_CONTINENT_CODE SA BlockCountry # Jižní Amerika
SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry # Rusko
# Povolení přístupu pro povolené země a blokace ostatních
Order Allow,Deny
Allow from env=AllowCountry
Deny from env=BlockCountry
Ověřte, že jsou pravidla správně aplikována, například pomocí VPN nebo nástrojů na testování přístupu z různých zemí (např. GeoPeeker).
