【问题标题】:htaccess rewrite rule doesn't like a url encoded / (%2F) [duplicate]htaccess 重写规则不喜欢 url 编码 / (%2F) [重复]
【发布时间】:2014-10-12 22:19:17
【问题描述】:

在我尝试传入 %2F(url 编码 /)之前,所有重写都在工作

htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]

无效的网址:

  • /divisions/other%2Fnon-merch/subdivisions

有效的网址:

  • /divisions/womans%27s%20shoes/subdivisions
  • /divisions/some-thing/subdivisions
  • /部门
  • /任何/其他/真的

【问题讨论】:

    标签: apache .htaccess mod-rewrite url-rewriting


    【解决方案1】:

    我找到了 Apache 的解决方案

    您必须启用编码斜线

    AllowEncodedSlashes 开启

    【讨论】:

      猜你喜欢
      • 2011-12-06
      • 2016-11-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多