在PHP中,镜像一个动态网页?

发布于 2024-09-14 03:37:41 字数 96 浏览 5 评论 0原文

我的博客位于 /blog,内容是动态的。

我希望我的网站上的/index.php 能够镜像/blog

如何编写index.php 来镜像动态网页?

I have my blog at location /blog, and the content is dynamic.

I would like /index.php on my site to mirror /blog

How do I write index.php to mirror a dynamic webpage?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寄离 2024-09-21 03:37:41

你真的应该直接转发它,否则你会因为重复的内容而被搜索引擎搜索到。如果您对人们通过搜索找到您的内容感兴趣,这对您来说应该很重要。

index.php 应包含以下代码:

<?php
    header('Location: /blog', true, 301);
    exit;
?>

You should really just forward it or you'll get dinged for duplicate content by search engines. This should matter to you if you're interested in people finding your content via search.

index.php should have the following code:

<?php
    header('Location: /blog', true, 301);
    exit;
?>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文