Score:0

IIS URL Rewrite rules to redirect domain suffix (path) to different ports on the same Virtual Machine

tk flag
  • I've made an A-record dev.ourcompany.com, pointing to the server IP-address
  • Installed ARR Routing and enabled Proxy
  • Installed URL Rewrite and made the following Rules: (screenshot with IIS config)
<rewrite>
    <rules>
        <rule name="thin" stopProcessing="true">
            <match url="thin" />
            <action type="Rewrite" url="http://10.10.10.21:6580/{R:0}" appendQueryString="true" />
        </rule>
        <rule name="grafana" stopProcessing="true">
            <match url="grafana" />
            <action type="Rewrite" url="http://10.10.10.21:3000/{R:0}" appendQueryString="true" />
        </rule>
    </rules>
</rewrite>

My goal is to have:

  • dev.ourcompany.com/thin goto http://10.10.10.21:6580 (on the same server)
  • dev.ourcompany.com/grafana goto http://10.10.10.21:3000 (on the same server)

I've tried:

with no luck however. I get something like:

  • 404: Not Found (and some other messages when playing around with the pattern ⬅️ I'm aware that the above pattern is probably wrong, but I've tried a lot of them...)

I've tried Server Farms, etc... but these things are not my strong point.

Tnx!

Lex Li avatar
vn flag
Show us the latest rules you wrote.
LBRP avatar
tk flag
I've added the rules
Lex Li avatar
vn flag
The rules look good enough, so to learn why 404 is there you will have to enable FRT and dig further, https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
LBRP avatar
tk flag
Thanks, will do so.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.