RewriteCond/RewriteRule blues

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 6
Joined: 27 Jan 2016, 16:18

RewriteCond/RewriteRule blues

20 May 2018, 09:20

I have an internal server http://munin.lan which I want to reach from outside the lan using the address https://mysite.com/munin.

I have therefore written the following:

Code: Select all
# if the user is trying to reach the munin server, redirect to munin.lan
   RewriteCond %{REQUEST_URI} /munin [nocase]
   RewriteRule ^(http|https)://(mysite.com/munin(.*?)) http://munin.lan [nocase, P, L]

# for all other cases, apply the following rule
   RewriteRule (.*)$ http://haus.lan/$1 [nocase, P, last]


That, however, does not work. The log says:

Code: Select all
 RewriteCond: input='/munin' pattern='/munin' => matched
 forcing proxy-throughput with http://haus.lan/munin
 go-ahead with proxy request http://haus.lan/munin [OK]
 Rewrite URL to >> /muninx.rwhlp?p=0
 rewrite 'munin' -> '/muninx.rwhlp?p=0'
 internal redirect with /muninx.rwhlp?p=0 [INTERNAL REDIRECT]


What am I doing that is wrong?

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 10 guests