将 ID 号重定向到子域

发布于 2024-09-25 13:50:39 字数 167 浏览 0 评论 0原文

www.mydomain.com/1233.html 这是我们网站中的主要主题,我需要从该网站删除我的脚本,谁进入此链接将被重定向到

myprogram.mydomain.com/v2 下面的链接/1233.html

这样做的过程是什么以及下面的文件所需的设置是什么? .htaccess

www.mydomain.com/1233.html this is the main topic which we have in the website and i need remove my script from this site and who ever will enter this link will be redirected to the link below

myprogram.mydomain.com/v2/1233.html

what is the process on doing so and the setup required for the file below ?
.htaccess

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

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

发布评论

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

评论(1

才能让你更想念 2024-10-02 13:50:39

以下内容应放入您的文档根目录中。如果您希望仅匹配 www.example.com,而不匹配 example.com 或 myprogram.example.com,请取消注释第一行

#RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/(\d+\.html)$ http://myprogram.example.com/v2/$1 [L]

The following should be put in your document root. Uncomment the first line if you want it to match www.example.com only, and not example.com or myprogram.example.com

#RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/(\d+\.html)$ http://myprogram.example.com/v2/$1 [L]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文