expertenaustausch > comm.software.* > comm.software.webserver

Gerome Muent (15.08.2019, 17:08)
Hi together,

I tried and failed to create a rule for:

if the requested server is it should redirect to
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:
f.e.

Thx for any help, Bernd
Andreas Kohlbach (15.08.2019, 22:14)
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:
> f.e.


Du darfst hier ruhig auf Deutsch schreiben. ;-)

> Thx for any help, Bernd


Der Absender meint "Gerome". Hmm.
Claus Reibenstein (15.08.2019, 23:08)
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
Ähnliche Themen