Skip to content

Instantly share code, notes, and snippets.

@tkhn
Created October 9, 2013 10:33
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save tkhn/6899277 to your computer and use it in GitHub Desktop.
Save tkhn/6899277 to your computer and use it in GitHub Desktop.
exclude one url from basic auth with apache
SetEnvIfNoCase Request_URI "^/status\.php" noauth
AuthType Basic
AuthName "Identify yourself"
AuthUserFile /path/to/.htpasswd
Require valid-user
Order Deny,Allow
Deny from all
Allow from env=noauth
Satisfy any
# credits to http://stackoverflow.com/questions/8978080/htaccess-exclude-one-url-from-basic-auth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment