【问题标题】:Nginx redirect to hashNginx 重定向到哈希
【发布时间】:2014-10-25 16:30:00
【问题描述】:

我在 nginx 中有这个虚拟主机,但我需要使用#(utm 参数)重定向,该怎么做?

server {
    server_name www.example1.com;
    return      301 https://www.example2.com$request_uri; # here I need add utm parameters
}

【问题讨论】:

    标签: redirect nginx utm


    【解决方案1】:

    在字符串中添加引号,它应该可以工作。

    return 301 "https://www.domain.com$request_uri#hash";
    

    【讨论】:

    • 这并没有提供问题的答案。要批评或要求作者澄清,请在其帖子下方发表评论。
    • 这是我的实际答案,不是建议,更改了措辞
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-08-14
    • 2012-09-08
    • 2019-10-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-11
    相关资源
    最近更新 更多