Skip to content

Instantly share code, notes, and snippets.

@explorer14
Created February 19, 2018 23:29
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/7f7ae0934c50f638936170b5ddfcfba9 to your computer and use it in GitHub Desktop.
Save explorer14/7f7ae0934c50f638936170b5ddfcfba9 to your computer and use it in GitHub Desktop.
<rewrite>
<outboundRules>
<rule name="AnchorFixer" preCondition="IsHTML"
enabled="true" stopProcessing="true">
<match filterByTags="A" pattern="^/Home/(.*)" />
<action type="Rewrite" value="/{R:1}" />
</rule>
<rule name="LinkNScriptFixer" preCondition="IsHTML"
enabled="true" stopProcessing="true">
<match filterByTags="Link, Script" pattern="^/(css|js)/(.*)"
negate="false" />
<action type="Rewrite" value="http://localhost:8021{R:0}" />
</rule>
<rule name="FormActionFixer" preCondition="IsHTML"
enabled="true" stopProcessing="true">
<match filterByTags="Form" pattern="^/(.*)/(.*)" />
<action type="Rewrite" value="/{R:2}" />
</rule>
<rule name="ResponseLocationFixer" preCondition="IsRedirection"
enabled="true" stopProcessing="true">
<match serverVariable="RESPONSE_LOCATION" pattern="^/(.*)/(.*)" />
<conditions>
</conditions>
<action type="Rewrite" value="/{R:2}" />
</rule>
<preConditions>
<preCondition name="IsRedirection">
<add input="{RESPONSE_STATUS}" pattern="3\d\d" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment