我在.htaccess文件中設置指令時遇到問題。努力實現,如果訪問者試圖打開RewriteRule指令重定向到未出現的頁面
http://localhost/occasions/anniversary/
...它必須調用browse.php在根目錄下的文件,併發送「紀念日」作爲參數之一。
我定義的指令,如:
RewriteRule ^/occasions/(.*)/$ http://localhost/browse.php?page=$1
...但它返回找不到頁面錯誤。
你能告訴我爲什麼,並幫我解決這個問題。
非常感謝您提前!
它根本沒有重定向。他得到了404,因爲RewriteRule沒有正確匹配。 – ziesemer 2011-12-31 17:14:01