【问题标题】:Redirect %20%E2%80%8E重定向 %20%E2%80%8E
【发布时间】:2013-09-11 11:05:45
【问题描述】:

我有一位客户用http://url/%20%E2%80%8E 发送电子邮件,但每个人都收到 404 未找到。所以他要求我重定向,我虽然很容易。但它看起来不起作用......请帮助!

我试过了:

 redirect 301 /\%20\%E2\%80\%8E http://url/promo-content/
 and
 redirect 301 /%20%E2%80%8E http://url/promo-content/

并且不工作..

我也试过了

  RewriteEngine on
  RewriteCond %{REQUEST_URI} ^/([a-zA-Z0-9_-]+)/\%20\%E2\%80\%8E$
  RewriteRule ^(.*) http://url/promo-content/%1/ [R,L]

但还是不行……有什么建议吗???

【问题讨论】:

    标签: apache .htaccess redirect


    【解决方案1】:

    在应用 mod_rewrite 规则之前首先对 URI 进行解码。试试:

    RewriteEngine On
    RewriteRule ^\ ‎ /promo-content/ [L,R=301]
    

    【讨论】:

      猜你喜欢
      • 2015-05-19
      • 2013-10-02
      • 1970-01-01
      • 2012-05-07
      • 2014-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多