更新 .htaccess 重写条件

发布于 2024-08-22 18:28:12 字数 158 浏览 4 评论 0原文

我想更新以下重写条件以仅允许一个特定的子域。

RewriteCond %{HTTP_HOST} !^domain.com$ [NC]

目前,它匹配所有子域,但我只想允许一个 - admin.domain.com。我该怎么做?

感谢您提前提供的任何帮助。

I'll like to update the following rewrite condition to only allow one particular subdomain.

RewriteCond %{HTTP_HOST} !^domain.com$ [NC]

At the moment, it matches all subdomains, but I'd like to allow just one - admin.domain.com. How would I do this?

Thanks for any help in advance.

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

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

发布评论

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

评论(1

陪我终i 2024-08-29 18:28:12

它应该有效:

RewriteCond %{HTTP_HOST} admin.domain.com [NC]
RewriteRule //whatever

我错了吗?

It should work:

RewriteCond %{HTTP_HOST} admin.domain.com [NC]
RewriteRule //whatever

Am I wrong?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文