2013-08-06 85 views
-1

我想道歉,因爲沒有很強的語言知識,但我有這樣的問題。 我做了一個重定向通過mode_rewrite現在url是「localhost/url/url2 /」apache,它重定向到 「localhost/url/url2/index.php」如何從url中刪除「index.php?」Mode_rewrite將index.php添加到url結尾

+0

在您的問題中發佈您的.htaccess。 – anubhava

回答

0

,如果你只想刪除的index.php然後把這樣的代碼htaccess的,

RewriteRule ^/$ http://localhost/url/url2/index.php 

地方這htaccess的文件,其中的index.php是

0

您可以使用此規則:

RewriteRule ^url/url2/$ /url/url2/index.php [L] 

瀏覽器不會在URL輸入中顯示index.php。