gpt4 book ai didi

php - 重定向页面但保留元标记

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:42:51 24 4
gpt4 key购买 nike

我使用重定向页面

header('Location: http://www.example.com/');

Google 已将我的页面编入索引,但使用的是我重定向到的页面的元标记。有没有办法保留我的谷歌元标记但仍重定向到该网站?也许在重定向之前有一个倒计时?

问候

最佳答案

您可以改用它。

<meta http-equiv="refresh" content="0; url=http://example.com/" />

内容后的 0 可以替换为页面重定向前的秒数。 Here's一些更多的信息。

或者,您可以使用 robots.txt,或使用 javascript 重定向。对于 robots.txt,请遵循本指南。 http://www.robotstxt.org/robotstxt.html

如果这对您有帮助,请告诉我!

关于php - 重定向页面但保留元标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47373125/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com