Created
February 22, 2021 18:22
-
-
Save Digi92/39617c18f32c5921425c19d1f8adb21c to your computer and use it in GitHub Desktop.
This file contains 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
AuthName "Protected Area" | |
AuthType Basic | |
AuthUserFile /path/to/your/.htpasswd | |
AuthGroupFile /dev/null | |
SetEnvIf Request_URI .* noauth | |
SetEnvIf Request_URI the_uri_you_want_to_protect !noauth | |
SetEnvIf Request_URI /another/uri/ !noauth | |
SetEnvIf Request_URI add_as_many_as_you_want !noauth | |
<IfModule mod_authz_core.c> | |
<RequireAny> | |
Require env noauth | |
Require valid-user | |
</RequireAny> | |
</IfModule> | |
<IfModule !mod_authz_core.c> | |
Order Deny,Allow | |
Deny from all | |
Satisfy any | |
Require valid-user | |
Allow from env=noauth | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment