如何将某些SiteMap.xml URL从子域重定向到.htaccess中的主要域

发布于 2025-01-28 04:53:34 字数 378 浏览 3 评论 0原文

当我将其用作无头CMS时,我在网站的子域上安装了WordPress安装。我有一个主要的应用程序,它消耗了部署到Vercel托管的无头CMS。 Vercel不允许我添加XML站点地图。

我有一些XML站点地点位于子域上。是否可以使用.htaccess将这些站点地点的URL重写/重定向到我的主要域?

假设我的站点地图像这样在子域上 /a>我希望能够在

有办法做到这一点吗?

I have a Wordpress installation on a sub domain of my website as I'm using it as a headless CMS. I have the main app that consumes the headless CMS deployed to Vercel hosting. Vercel doesn't let me add xml sitemaps.

I have some xml sitemaps sitting on the sub domain. Is it possible to use .htaccess to rewrite/redirect the urls of these sitemaps on the sub domain to my main domain?

Assuming my sitemap is on the sub domain like this https://wp.example.net/sitemap.xml and I want to be able to access it at https://example.net/sitemap.xml

Is there a way to do this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文