2009-05-21 94 views
0

我有以下規則:mod_rewrite的問題

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} !=/favicon.ico 
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] 

和我的網址如下:

http://www.mydomain.com/189-9544737-0616922?%5Fencoding=UTF8&node=10 

在myphp.php

var_dump($_GET): array(3) { 
    ["q"]=> string(19) "185-8676848-3133633" 
    ["_encoding"]=> string(4) "UTF8" 
    ["node"]=> string(2) "10" } 

任何想法?

問候,

+0

「有什麼想法? - 您可能想先告訴我們您的期望。 – VolkerK 2009-05-21 20:51:34

+0

但實際上錯在哪裏? – random 2009-09-14 14:07:50

回答

0

嘗試添加B修改:

Apache在 之前取消轉義的URL映射它們,所以反向引用將 在當時被轉義他們 應用。使用B標誌, 反向引用中的非字母數字字符 將被轉義。

RewriteRule ^(.*)$ index.php?q=$1 [B,L,QSA]