Skip to content

Instantly share code, notes, and snippets.

@explorer14
Last active February 20, 2018 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save explorer14/24980ebf8289e926990b152e8f26fd86 to your computer and use it in GitHub Desktop.
Save explorer14/24980ebf8289e926990b152e8f26fd86 to your computer and use it in GitHub Desktop.
<rewrite>
<globalRules>
<rule name="ReverseProxyRule1" enabled="false">
<match url="^About" />
<action type="Rewrite" url="http://localhost:8021/Home/About" />
<conditions>
<add input="{SERVER_PORT}" pattern="88" />
</conditions>
</rule>
<rule name="ReverseProxyRule2" enabled="true" stopProcessing="true">
<match url="^Contact" />
<action type="Rewrite" url="http://localhost:8021/Home/Contact" />
<conditions>
<add input="{SERVER_PORT}" pattern="88" />
</conditions>
<serverVariables>
<set name="ORIGINAL_HOST" value="{HTTP_HOST}" />
</serverVariables>
</rule>
<rule name="FormSubmitter" enabled="true" stopProcessing="true">
<match url="^Submit" />
<action type="Rewrite" url="http://localhost:8021/Home/Submit" />
</rule>
</globalRules>
<outboundRules>
<preConditions>
<preCondition name="IsHTML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment