Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

RewriteCond %{HTTP_HOST} !^go\.domain\.com$ [NC] 
RewriteRule ^(.*)$ https://go.domain.com [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:

www.domain.com/terms

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

share|improve this question
add comment

2 Answers

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
add comment

Add a condition to exclude this URL:

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

Your Answer

 
discard

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.