Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an existing .htaccess file with the following rewritecond:

RewriteCond %{HTTP_HOST} !^go\.domain\.com$ [NC] 
RewriteRule ^(.*)$ [R,L]

In essence, everything on this domain is forced to the go subdomain.

However, there is one url that I would like to leave as-is, and not rewrite:

How do I add in an additional RewriteCond to exclude this specific url?

share|improve this question

Add a condition to exclude this URL:

RewriteCond %{REQUEST_URI} !^/terms$
share|improve this answer

I think preceeding this with

^(www\.domain\.com/terms)$ $1 [L]

might help (rewrite the special url with itself and don't continue).

share|improve this answer
When you say preceding, do you mean create a new RewriteCond or a new RewriteRule? – JonoB Feb 26 '13 at 11:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.