5

これを使用して、場所がローカルサーバーかライブサーバーか.htaccessを変更しようとしています。RewriteBase

Options +FollowSymlinks
RewriteEngine on

<LocationMatch "^/(bbtsrv02)/$">
    #RewriteBase /beta/admin/
</LocationMatch>

RewriteCond %{REQUEST_URI} !index.php$
RewriteCond %{REQUEST_URI} !css/(.*)\.
RewriteCond %{REQUEST_URI} !img/(.*)\.
RewriteCond %{REQUEST_URI} !incs/(.*)\.
RewriteCond %{REQUEST_URI} !js/(.*)\.
RewriteCond %{REQUEST_URI} !upload/(.*)\.
RewriteCond %{REQUEST_URI} !widget/(.*)\.
RewriteRule ^(.*) index.php?_pd=$1 [NC,L]

削除するとすぐにLocationMatch、すべてが再び機能し始めます。RewriteBaseライブテスト用に変更するだけです。

4

1 に答える 1

11

<LocationMatch>ディレクティブは.htaccessファイルでは使用できません-サーバー構成または仮想ホストコンテキストでのみ使用できます。

http://httpd.apache.org/docs/current/mod/core.html#locationmatch

于 2011-07-12T11:56:28.483 に答える