我做了一個mod_rewrite條件,它只是將一個參數添加到index.php
文件中。那就是:mod_rewrite沒有找到索引文件?
RewriteEngine On
RewriteRule ^(electronic|classical|reggae)$ index.php?genre=$1
當我做mydomain.com/electronic
規則將識別嘗試加載索引文件,但它有一個404
,說
The requested URL /media/sde1/home/www/[mydomain].com/public_html/index.php was not found on this server.
有關錯誤有趣的部分是返回上面列出的文件路徑直接指向我的服務器上的根索引文件。
有人知道爲什麼會這樣?
這哪裏是重寫規則在什麼位置?錯誤消息中的「請求的URL」看起來很奇怪 - 完整的路徑不應該在那裏 – 2012-02-26 17:34:14