我有以下规则:
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
on myphp.php
var_dump($_GET): array(3) {
["q"]=> string(19) "185-8676848-3133633"
["_encoding"]=> string(4) "UTF8"
["node"]=> string(2) "10" }
有什么想法吗?
的问候,
答案 0 :(得分:0)
尝试添加B
修饰符:
Apache之前必须先浏览网址 映射它们,所以反向引用会 在他们的时候被转义 应用。使用B标志, 中的非字母数字字符 反向引用将被转义。
RewriteRule ^(.*)$ index.php?q=$1 [B,L,QSA]