【问题标题】:encoding with .htaccess使用 .htaccess 进行编码
【发布时间】:2012-09-23 03:36:48
【问题描述】:


要访问我网站中的页面,我使用此规则

^/map/(.+)\-([0-9]{1,5})/map-.+\-street\-([a-z])\.html$

我使用的链接是www.mydomain.com/map/neus%e4%df-86/map-neus%e4%df-street-a.html。 当我检查 IIS7 重写日志时,链接被转换为
/map/neusä߆/map-neusäß-street-a.html,当然我得到了 404 错误。

所以,我的问题是,为什么 neus%e4%df-86 会变成 neusä߆ 而不是neustäß
(P.S. page-s 编码为 charset=iso-8859-1)

【问题讨论】:

    标签: .htaccess mod-rewrite encoding iis-7 rewrite


    【解决方案1】:

    所以,我找到了解决方案。 [NE] 标志未在规则末尾设置。与 Helicon 的文档相关,"NE: Don't escape output. By default ISAPI_Rewrite will encode all non-ANSI characters as %xx hex codes in output." 这样链接保持未编码。

    【讨论】:

      猜你喜欢
      • 2014-05-27
      • 1970-01-01
      • 1970-01-01
      • 2012-11-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多