【发布时间】:2019-08-25 10:16:13
【问题描述】:
我目前正在尝试重定向以下内容:
bar.com/foo ====> bar.com/bar.html#/#
我的重定向规则如下:
RewriteEngine On
RewriteRule ^/foo$ bar.com/bar.html#/# [R=301,L,NC]
这是我运行测试 curl 时的输出:
301 http://bar.com/foo ======>
https://bar.com/bar.html%23/%23
它返回一个 301 HTTP 响应;但是,这些 %23 字符是表示重定向后 # 将出现在 URL 中的编码指示,还是 URL 的文字表示?如果这是不正确的,我需要做任何转义吗?
提前感谢您的帮助。
【问题讨论】:
标签: regex apache redirect url-redirection http-status-code-301