我怎樣才能永遠不會顯示index.php?例如,爲了
site.com/index.php/controller所有請求重定向在瀏覽器地址欄
site.com/controller?使用.htaccess,從不顯示index.php
我當前htaccess的去除的index.php但是當用戶直接類型site.com/index.php/controller它們仍然顯示在地址欄中該地址,而不是site.com/controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
注:燃燒之前,我已經檢查了許多能夠解決重定向的index.php的.htaccess的線程,但我還沒有找到一個從來沒有的index.php顯示。這裏有幾個...
Not Show index.php in subdirectory
remove index.php in codeigniter
任何人都能夠在此闡明?任何幫助深表感謝。謝謝。 – csi