Created
January 5, 2012 12:19
-
-
Save justinkelly/1565033 to your computer and use it in GitHub Desktop.
Exclude file/directories/urls from Apache .htaccess password protected site
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AuthType Basic | |
AuthName "Auth Required" | |
AuthUserFile /path/to/.htpasswd | |
Require valid-user | |
# allow public access to the following resources | |
SetEnvIf Request_URI "(path/to/directory/)$" allow | |
SetEnvIf Request_URI "(path/to/file\.phpt)$" allow | |
SetEnvIf Request_URI "(util)$" allow | |
Order allow,deny | |
Allow from env=allow | |
# allow open access to entire site for select ips and sites | |
Allow from 777.777.77.7 | |
Allow from 888.888.88.8 | |
Satisfy any |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment