0
我需要從http://example.com/file.php?id=test&cat=category
重寫URL到http://example.com/file?test&cat=category
重寫URL我只實現改寫到/file
與路徑/file.php
:與mod_rewrite的
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^/?(\w+)$ $1.php [QSA,NC,L]
如何重寫URL的休息嗎?第二個問題:是否可以阻止默認的URL訪問,因此用戶必須使用重寫的URL?
感謝您的回答,它真的幫了我很多。 – 2013-03-23 22:09:37