
1 つのファイル、1 つのフォルダー、および 1 つの書き換えられた URL の場所を除いて、基本認証で保護されている Web サイトがあります。
次のようになります:
<Directory /var/www/mydomain.com>
AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/etc/htpasswd.mydomain"
Require valid-user
Options Indexes FollowSymLinks
AllowOverride All
</Directory>
<Location /manifest.webmanifest>
Satisfy Any
Allow from all
</Location>
<Location /icons/>
Satisfy Any
Allow from all
</Location>
<Location /receive>
Satisfy Any
Allow from all
</Location>
manifest.webmanifest
フォルダー内のファイルは/icons/
認証をバイパスしますが、/receive
バイパスしません。明らかな違いは、receive
実際のファイルではなく、レンダリングのために /index.php に書き換えられることです。
/receive の認証をバイパスするにはどうすればいいですか?
編集: 書き換えは .htaccess ファイルで行われます:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php !-f
RewriteRule ^(.*)$ index.php?AppRouting=$1 [QSA]