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

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).

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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