开发者

HTAccess LocationMatch Server Error

I'm trying to use this .htaccess to change the RewriteBase if the location is local or live server.

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]

开发者_JAVA百科As soon as I remove the LocationMatch the whole thing starts working again. I only need to change the RewriteBase for live testing.


<LocationMatch> directive CANNOT be used in .htaccess file -- only in server config or virtual host context.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜