-1
我試圖讓這個工作,但我有問題。當我去http://localhost/test/demo/
並回顯出價值p
時,我得到demo
。但是當我去http://localhost/test/demo/moretext/
p
的值是index.php/moretext
爲什麼這樣做呢? .htaccess
文件位於test
目錄中。htaccess沒有給出正確的值
Options +FollowSymLinks
RewriteEngine On
RewriteBase /test/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)/(.+?)/$ index.php?p=$1&file=$2
RewriteRule ^(.+?)/$ index.php?p=$1
沒了,只是加載 「WAMP的」 defalut頁。 – 2013-04-08 01:31:49
修改我的答案。 – 2013-04-08 01:39:50
仍加載「wamp的」默認頁面。 – 2013-04-08 01:42:04