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

.htaccess:清理查询字符串

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

    所以我有一些特殊的变量,它们会把我正在使用的内容管理系统搞砸。

    RewriteCond %{QUERY_STRING} option\=com\_aicontactsafe\&sTask\=captcha
    RewriteRule (.*) "/index.php" [R=301, L]
    

    此时,只需将文件路径写入index.php 在HTTP\ U主机之后。 这是403,但不是我想要的。

    1 回复  |  直到 16 年前
        1
  •  0
  •   David Z    16 年前

    重定向到 /index.php? 而不仅仅是 /index.php