Skip to content

Instantly share code, notes, and snippets.

@explorer14
Created February 19, 2018 22:30
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/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