IIS Rewrite to a new port - Different IIS version, different results

0

A server (x.com) has the following parameters:
- It is accessible from the outside from port 80.
- It has an internal service running on port 1000.
- The service needs to be accessible from a subdomain (service.x.com)

Running IIS on Windows 10, I did the following:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="URL Rewrite" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{CACHE_URL}" pattern="^(https?)://" />
                    </conditions>
                    <action type="Rewrite" url="{C:1}://localhost:1000/{R:1}" logRewrittenUrl="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

And it worked beautifully.

The same code, on the other end, run on Windows Server 2012 R2 yields this:

HTTP Error 404.4 - Not Found
The resource you are looking for does not have a handler associated with it.

Module IIS Web Core
Notification MapRequestHandler
Handler ExtensionlessUrlHandler-Integrated-4.0
Error Code 0x8007007b

I do not understand why it works on one version of IIS and not on the other one.

iis
rewrite
asked on Stack Overflow Mar 31, 2016 by Thomas

1 Answer

2

I found: ARR (Application Request Routing) needs to be enable.
Of course, this is not mentioned anywhere in any of the error messages nor in log.

answered on Stack Overflow Mar 31, 2016 by Thomas

User contributions licensed under CC BY-SA 3.0