我試圖將所有請求內部重定向到index.php,並使用.htaccess文件從外部重定向包含index.php的所有請求。將URL重寫爲index.php,但避免在URL中使用index.php
所以像http://host/test網址應該由index.php文件和URL處理像http://host/index.php/test應該被重定向到http://host/test,然後通過index.php文件處理(不將瀏覽器重定向到index.php)
我嘗試以下,但總是提示「重定向過多...」:
RewriteRule ^index\.php/?(.*)$ /$1 [R,L]
RewriteRule .* index.php/$0 [L]
等待,這不利於;我誤解了一些問題。 – 2010-05-30 13:15:41