DPC-iT

htaccess Verzeichnisschutz für url Aufruf


# Verzeichnisschutz
# Do the regex check against the URI here, if match, set the "require_auth" var
SetEnvIf Request_URI "/*/vertraulich" require_auth=true
SetEnvIf Request_URI "/*/protected" require_auth=true

# Auth stuff
AuthUserFile /path/to/passwordfile/.htpasswd
AuthName "Password Protected"
AuthType Basic

# Setup a deny/allow
Order Deny,Allow
# Deny from everyone
Deny from all

# 1. a valid authenticated user
Require valid-user
# or 2. the "require_auth" var is NOT set
Allow from env=!require_auth

# except if either of these are satisfied
Satisfy any

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Nach oben scrollen