Jam*_*mes 5 .htaccess local live locationmatch
我正在尝试使用它.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]
Run Code Online (Sandbox Code Playgroud)
一旦我删除LocationMatch整个事情再次开始工作.我只需要改变RewriteBase实时测试.
<LocationMatch>指令不能在.htaccess文件中使用 - 仅在服务器配置或虚拟主机上下文中使用.
http://httpd.apache.org/docs/current/mod/core.html#locationmatch
| 归档时间: |
|
| 查看次数: |
8758 次 |
| 最近记录: |