Skip to content

Instantly share code, notes, and snippets.

@explorer14
Created February 19, 2018 22:30
Show Gist options
  • Save explorer14/cb06e42070188e44709c40f4228a1855 to your computer and use it in GitHub Desktop.
Save explorer14/cb06e42070188e44709c40f4228a1855 to your computer and use it in GitHub Desktop.
<rule name="ResponseLocationFixer"
preCondition="IsRedirection"
enabled="true" stopProcessing="true">
<match serverVariable="RESPONSE_LOCATION" pattern="^/(.*)/(.*)" />
<action type="Rewrite" value="/{R:2}" />
</rule>
<preConditions>
<preCondition name="IsRedirection">
<add input="{RESPONSE_STATUS}" pattern="3\d\d" />
</preCondition>
</preConditions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment