1

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?

2 Answers 2

5

Add a condition to exclude this URL:

RewriteCond %{REQUEST_URI} !^/terms$
0

I think preceeding this with

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

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

1
  • When you say preceding, do you mean create a new RewriteCond or a new RewriteRule?
    – JonoB
    Feb 26, 2013 at 11:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .