代码之家  ›  专栏  ›  技术社区  ›  maozet

修改问题

  •  0
  • maozet  · 技术社区  · 16 年前

    我有以下规则:

    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" } 
    

    有什么想法吗?

    当做

    1 回复  |  直到 16 年前
        1
  •  0
  •   Sean Bright Sean Stinehour    16 年前

    尝试添加一个 B 修饰语:

    Apache必须先卸载url 映射它们,以便反向引用 在他们离开的时候不被人发现 应用使用B标志, 中的非字母数字字符 反向引用将被转义。

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