Home  >  Q&A  >  body text

How to write such Apache RewriteCond?

Require:
When users visit http://ask.mysite.com, they are redirected to the maintenance page.
When accessing other URLs, such as http://bbs.mysite.com or http://mysite.com, it will display normally.

It is to determine the subdomain

大家讲道理大家讲道理2713 days ago472

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-16 17:06:00

    RewriteCond %{HTTP_HOST} !^ask\.mysite\.com [NC]

    reply
    0
  • Cancelreply