<Files>
ブロック内で Auth ディレクティブを使用することはできません。ブロック内<Directory>
または .htaccess ファイル内にある必要があります。ただし、環境変数を設定してSatisfy Any
、特定のリクエストの認証をバイパスするために使用できます。
SetEnvIfNoCase Request_URI ^/index.html$ norequire_auth=true
SetEnvIfNoCase Request_URI ^/$ norequire_auth=true
# Auth stuff
AuthUserFile C:/wamp/www/eyedream/trunk/www/.htpasswd
AuthName "Please login"
AuthType Basic
# Setup a deny/allow
Order Deny,Allow
# Deny from everyone
Deny from all
# except if either of these are satisfied
Satisfy any
# 1. a valid authenticated user
Require valid-user
# or 2. the "require_auth" var is NOT set
Allow from env=norequire_auth