Skip to content

Instantly share code, notes, and snippets.

@kyleridolfo
Created September 25, 2014 14:34
Show Gist options
  • Save kyleridolfo/776d85e6328f13a8b72a to your computer and use it in GitHub Desktop.
Save kyleridolfo/776d85e6328f13a8b72a to your computer and use it in GitHub Desktop.
Password protect a URI
SetEnvIf Request_URI "/page-to-protect" passreq
AuthType Basic
AuthName "Password Required"
AuthUserFile /path/to/.htpasswd
Require valid-user
Order allow,deny
Allow from all
Deny from env=passreq
Satisfy any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment