Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comm.software.webserver > #1334 > unrolled thread

apache; 2 rewriteCond in AND mode

Started byGerome Muent <kontakt@bmservices.de>
First post2019-08-15 17:08 +0200
Last post2019-08-15 23:08 +0200
Articles 3 — 3 participants

Back to article view | Back to de.comm.software.webserver


Contents

  apache; 2 rewriteCond in AND mode Gerome Muent <kontakt@bmservices.de> - 2019-08-15 17:08 +0200
    Re: apache; 2 rewriteCond in AND mode Andreas Kohlbach <ank@spamfence.net> - 2019-08-15 16:14 -0400
      Re: apache; 2 rewriteCond in AND mode Claus Reibenstein <4spamersonly@kabelmail.de> - 2019-08-15 23:08 +0200

#1334 — apache; 2 rewriteCond in AND mode

FromGerome Muent <kontakt@bmservices.de>
Date2019-08-15 17:08 +0200
Subjectapache; 2 rewriteCond in AND mode
Message-ID<qj3si1$t54$2@news.albasani.net>
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

[toc] | [next] | [standalone]


#1335

FromAndreas Kohlbach <ank@spamfence.net>
Date2019-08-15 16:14 -0400
Message-ID<87lfvu89v0.fsf@usenet.ankman.de>
In reply to#1334
On Thu, 15 Aug 2019 17:08:49 +0200, Gerome Muent wrote:

[...]

> But it does not work.
> Still redirects ALL requests to server2.
>
> But it should not:
> www.server1.com/prod/rest/appointsments f.e.

Du darfst hier ruhig auf Deutsch schreiben. ;-)

> Thx for any help, Bernd

Der Absender meint "Gerome". Hmm.
-- 
Andreas

[toc] | [prev] | [next] | [standalone]


#1336

FromClaus Reibenstein <4spamersonly@kabelmail.de>
Date2019-08-15 23:08 +0200
Message-ID<grlvtoFnj62U2@mid.individual.net>
In reply to#1335
Andreas Kohlbach schrieb am 15.08.2019 um 22:14:

> On Thu, 15 Aug 2019 17:08:49 +0200, Gerome Muent wrote:
>
>> Thx for any help, Bernd
>
> Der Absender meint "Gerome". Hmm.

Und der bedankt sich bei Bernd ;-)

Gruß
Claus

[toc] | [prev] | [standalone]


Back to top | Article view | de.comm.software.webserver


csiph-web