如果我有一个PHP系统A(.htaccess如下),我需要将其他系统B子文件夹放在A' s就像htp://www.a.com/B/ 如何更改代码以使其工作? (只是因为我现在键入htp://www.a.com/b/时可以看到登录页面,但是当我登录时,会重定向到htp://www.a.com/index.php)
RewriteEngine On
RewriteBase "/"
RewriteCond %{QUERY_STRING} rewrite
RewriteRule .* - [L]
RewriteRule index\.php(.*) $1 [R=302,L]
RewriteRule ^$ "/index.php?rewrite" [qsa,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_URI} \.(js|css|jpe?g|jpe|gif|png|ico)$ [NC]
RewriteRule .* - [L]
multiple rewrites
RewriteRule /?(.*) "/index.php?rewrite=$1" [qsa,L]
答案 0 :(得分:0)
在RewriteBase
下方插入此RewriteRule
以跳过目录B
:
RewriteRule ^B(/.*)?$ - [L,NC]