Skip to content

Instantly share code, notes, and snippets.

@loulou2u
Created May 15, 2015 17:11
Show Gist options
  • Save loulou2u/7818c6c9b18a4af8e09c to your computer and use it in GitHub Desktop.
Save loulou2u/7818c6c9b18a4af8e09c to your computer and use it in GitHub Desktop.
.htaccess file to determine SECURED URI
SetEnvIfNoCase Request_URI "^/authenticated-directory/*" SECURED
# enforce auth if SECURED=1
AuthType Basic
AuthName "Login Required"
AuthUserFile /path/to/.htpasswd
Require valid-user
Order allow,deny
Allow from all
Deny from env=SECURED
Satisfy any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment