Apache2 ロケーションディレクティブと mod_rewrite

Apache2 ロケーションディレクティブと mod_rewrite

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]

関連情報