Apache2 위치 지시문 및 mod_rewrite

Apache2 위치 지시문 및 mod_rewrite

파일 1개, 폴더 1개, 다시 작성된 URL 위치 1개를 제외하고 기본 인증으로 보호되는 웹사이트가 있습니다.

다음과 같습니다:


<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]

관련 정보