我想重定向這樣所有請求我index.php
腳本,一切走後http://mysite/
會傳遞給index.php
以URL參數。例如,http://mysite/moo.css
應該變爲http://mysite/index.php/moo.css
而http://moosite/moo/foo/bar/
應該變成http://index.php/moosite/moo/foo/bar/
。的.htaccess mod_alias中和mod_rewrite的重定向被忽略
很簡單,是吧?
但不是RedirectMatch (.*) index.php/$1
,也不RewriteRule ^(.*)$ index.php/$1 [R,L]
(或其他正則表達式像; RewriteEngine on
是不 ommitted; mod_rewrite
和mod_alias
導通)正式生效。
發生了什麼事?
發佈整個事情 - 你的htaccess還有什麼? – cwallenpoole
@cwallenpoole,什麼也沒有=) – shybovycha