Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

2 RewriteCond in AND mode

0 views
Skip to first unread message

Gerome Muent

unread,
Aug 15, 2019, 11:08:14 AM8/15/19
to
Hi together,

I tried and failed to create a rule for:

if the requested server is www.server1.com it should redirect to
www.server2.com unless the request url does not contain "prod/rest/"

I tried:

RewriteCond %{HTTP_HOST} !www.server2.com$ [NC]
RewriteCond !prod/REST/ [L]
RewriteRule ^(.*)$ https://www.server1.com/$1 [^] [L,R=301]

But it does not work.
Still redirects ALL requests to server2.

But it should not:
www.server1.com/prod/rest/appointsments f.e.

Thx for any help, Bernd
0 new messages