Answer the question
In order to leave comments, you need to log in
How to properly link RewriteCond?
Actually, subject.
You need to redirect domain.com/bar/.. to the main one, only if not foo.domain.com/bar/..
Tried like this:
RewriteCond %{HTTP_HOST} !^([.]+)\.domain.com$ [NC]
RewriteCond %{REQUEST_URI} ^/bar [NC]
RewriteRule ^(.*)$ https://domain.com [L,R=302]
RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^domain.com/foo
RewriteRule ^(.*)$ https://domain.com [L,R=302]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question