Created
August 23, 2017 04:33
-
-
Save kuniiskywalker/b17f46f883d43633ec5454cceff6ca90 to your computer and use it in GitHub Desktop.
.htaccess 特定の条件のみbasic認証を発動
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
SetEnvIf Request_URI "/ibaraki*" ibaraki | |
AuthUserFile /home/.htpasswd | |
AuthGroupFile /dev/null | |
AuthName "Input your ID and Password." | |
AuthType Basic | |
# 以下いずれかの条件がtrueの場合は認証要求なし | |
Satisfy any | |
# 条件1 :basic認証済の場合true | |
require valid-user | |
# 条件2 :/ibaraki以外はtrue | |
Order Deny,Allow | |
Deny from all | |
allow from env=!ibaraki |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment