0
從文件中刪除.PHP我想從每個URL tream .PHP像localhost/index.php
--->localhost/index
但我也想localhost/index/
工作過....使用htacess
下面是當前代碼我正在使用
#for hiding.php extension
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)/?$ $1\.php [NC]
############################-------- END ---------########################
有人可以提出更改嗎?
看看這個Q&A:http://stackoverflow.com/questions/1068595/htaccess-code-to-remove-extension-and-addforce-trailing-slash – vbo