loading...

IIS UrlRewrite: How to rewrite from just a domain to domain and path

bugmagnet profile image Bruce Axtens ・1 min read

I have successfully written a web.config that lets me reverse-proxy a site and have it appear in a either a server's IFRAME or even on my own localhost. A reduced/redacted version of the it follows.

<system.webServer&gt
    <rewrite>
        <rules>
            <rule name="ReverseProxyInboundRule1" stopProcessing="false">
                <match url="(.*)" />
                <action type="Rewrite" url="https://www.example.com/{R:1}" logRewrittenUrl="true" />
                <serverVariables>

Discussion

markdown guide