【问题标题】:php header: how to include nofollow in a location commandphp 标头:如何在位置命令中包含 nofollow
【发布时间】:2021-10-28 07:22:57
【问题描述】:

我正在使用:header("Location: https://www.link.com");,但我希望能够在其中指定禁止关注。在另一篇文章中,有人解释使用header("X-Robots-Tag: noindex, nofollow", true);。但是我该如何组合它们呢?我试过header("X-Robots-Tag: noindex, nofollow; Location: https://www.link.com"), true);,但没有用。有谁知道正确的语法?谢谢

【问题讨论】:

    标签: php header location nofollow


    【解决方案1】:

    你多次调用它:

    header("X-Robots-Tag: noindex, nofollow");
    header("Location: https://www.example.com");
    

    【讨论】:

      猜你喜欢
      • 2016-11-27
      • 2013-04-04
      • 1970-01-01
      • 1970-01-01
      • 2017-10-10
      • 2017-01-18
      • 1970-01-01
      • 2017-04-04
      • 2023-03-29
      相关资源
      最近更新 更多