我在我的網頁上有一個重寫規則。我的RewriteRule有什麼問題?它似乎沒問題,但它不起作用
RewriteEngine On
RewriteRule ^(.*) index.php?p=$1 [L]
我希望它的工作,因此重寫的URL是這樣的:
http://example.com -> index.php
http://example.com/home -> index.php?p=home
http://example.com/lol -> index.php?p=lol
但是,當我用我的index.php裏面下面的PHP代碼
print_r($_GET)
它給出了這樣的:
Array ([p] => index.php)
它給出了相同的結果在所有的URL(我試過這些:http://example.com
,http://example.com/
,http://example.com/about
,http://example.com/about/
你能幫我debig這個嗎?
什麼? 'mod_rewrite'離題在這裏?我們甚至有一個標籤維基! – 2013-05-02 10:56:22