在 WordPress 上的 htaccess 中重写

发布于 2024-09-07 07:19:31 字数 228 浏览 1 评论 0原文

我错误地在测试域的文件夹中创建了一个站点,现在我想将该 URL 的所有流量重定向到新的 URL。

例如,我有: http://subdomain.example.com/blog 我希望它能够继续到一个全新的域。

任何帮助表示赞赏。

谢谢, 马特

I made the mistake of creating a site in a folder on a test domain and now I want to redirect any traffic to that URL to the new one.

For instance I have: http://subdomain.example.com/blog and I want it to go to a complete new domain.

Any help is appreciated.

Thanks,
Matt

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

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

发布评论

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

评论(1

久光 2024-09-14 07:19:31

在 htaccess 文件中重定向到一个全新的域,您可以执行以下操作:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

In the htaccess file to redirect to a completely new domain you could do something like this:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文