Quantcast
Viewing all articles
Browse latest Browse all 11

Answer by Stefan for Password protect a specific URL

All the provided solutions didn't work for me. I figured following directives do the trick:

SetEnvIf Request_URI ^/page-url auth=1AuthName "Please login"AuthType BasicAuthUserFile "/www/live.example.com/files/html/.htpasswd"# first, allow everybodyOrder Allow,DenySatisfy anyAllow from allRequire valid-user# then, deny only if requiredDeny from env=auth

Viewing all articles
Browse latest Browse all 11

Trending Articles