DEV Community

Bruce Axtens
Bruce Axtens

Posted on

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

2

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 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>
                    <set

Top comments (0)