2x " order allow,deny " bzw. " allow from all " in einer .htaccess

Wenn ich es richtig verstehe, dann nein. 
 

Ich möchte via .htaccess eine Witelist erstellen: GeoIPEnable OnSetEnvIf GEOIP_COUNTRY_CODE DE AllowCountrySetEnvIf GEOIP_COUNTRY_CODE AT AllowCountrySetEnvIf GEOIP_COUNTRY_CODE CH AllowCountrySetEnvIf GEOIP_COUNTRY_CODE US AllowCountryOrder deny,allowDeny from allAllow from env=AllowCountryDas funktioniert, allerdings darf keine andere Regel in der .htacces sein wie zum Beispiel:<Limit GET POST HEAD>order allow,denydeny from 185.6.8allow from all</Limit>
Laut deiner Analyse mische ich so WhiteList und eine Blacklist durcheinander. 

Du meintest, ich soll folgendes machen:

D.h. es wird erst einmal alles blockiert, außer es gibt eine explizite Allow-Regel. Folgender Block setzt das um:

GeoIPEnable On
SetEnvIf GEOIP_COUNTRY_CODE DE AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE AT AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE CH AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE US AllowCountry
Order allow, deny #alles, was nicht freigegeben wurde, wird blockiert
Allow from env=AllowCountry #du gibst alle Länder, die du oben definiert hast, frei
Deny from 185.6.8 #du blockierst speziell noch einmal diese IP, alle weiteren erhalten jeweils eine zusätzliche Zeile darunter

Und dabei erhalte ich eben den Error 500 Fehler. 

Oder ich verstehe was falsch, dann bitte ich dies zu entschuldigen. 

 
GeoIPEnable OnSetEnvIf GEOIP_COUNTRY_CODE DE AllowCountrySetEnvIf GEOIP_COUNTRY_CODE AT AllowCountrySetEnvIf GEOIP_COUNTRY_CODE CH AllowCountrySetEnvIf GEOIP_COUNTRY_CODE US AllowCountryOrder deny,allowDeny from allAllow from env=AllowCountry
Das ist dein Code.

GeoIPEnable On
SetEnvIf GEOIP_COUNTRY_CODE DE AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE AT AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE CH AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE US AllowCountry
Order allow, deny #alles, was nicht freigegeben wurde, wird blockiert
Allow from env=AllowCountry #du gibst alle Länder, die du oben definiert hast, frei
Deny from 185.6.8 #du blockierst speziell noch einmal diese IP, alle weiteren erhalten jeweils eine zusätzliche Zeile darunter

Das ist der geänderte. Der einzige Unterschied ist die Reihenfolge von allow und deny.

 
Zurück
Oben