2014-11-08 44 views
2

如果我有一個PHP系統A(下面的.htaccess),我需要將其他系統B子文件夾放在A的下方,就像htp://www.a.com/B/ 如何將代碼更改爲做這個工作? (因爲現在當我輸入htp://www.a.com/b/可以看到登錄頁面,但是當我登錄時,會重定向到htp://www.a.com/index.php)我有其他系統在子文件夾中,如何編寫.htaccess?

謝謝!!

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

略低於RewriteBase插入此RewriteRule跳過目錄B

RewriteRule ^B(/.*)?$ - [L,NC] 
+1

謝謝!我知道了! – 2014-11-12 02:57:46

相關問題