Apache url 重写规则

发布于 2024-10-02 08:28:08 字数 235 浏览 0 评论 0原文

我需要配置一个我无法弄清楚的特定 url 重写配置。只是想知道是否有人可以帮助

我需要重写 http://city-business.domain.com/ * 至 htpp://city.domain.com/business/*

我真的希望这是可能的......

谢谢, 帕维尔

I need to configure a specific url rewrite configuration I can't figure out. Just wonder if anybody can help

I need to rewrite http://city-business.domain.com/* to htpp://city.domain.com/business/*

I really hope that this is possible ...

Thank you,
Pavel

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

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

发布评论

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

评论(1

一张白纸 2024-10-09 08:28:09

试试这个规则:

RewriteCond %{HTTP_HOST} =city-business.example.com
RewriteRule ^ http://city.example.com/business%{REQUEST_URI} [L,R=301]

Try this rule:

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