我不太熟悉配置我的.htaccess,所以請幫助我。將index.php請求重定向到http:// localhost/website /使用.htaccess
我有去到的index.php一個鏈接,但我不想index.php文件出現在我的網址
eg.
http://localhost/website/index.php
我希望它被重定向到根文件夾是
http://localhost/website/
所以我試圖尋找答案,這是我到目前爲止。
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://localhost/website/$1 [R=301,L]
現在,當我嘗試點擊我的本地網站的主頁,而不是重定向我
http://localhost/website
它被重定向到這一點 -
http://localhost/Applications/XAMPP/xamppfiles/htdocs/website/localhost/website/
誰能解釋這是怎麼回事上?
框架巴託空也明白了嗎? –
沒有。不是一個框架。 –