Last active
December 19, 2015 18:58
-
-
Save nickspiers/6002568 to your computer and use it in GitHub Desktop.
301 IIS Rewrite Module for Legacy URLS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Redirect rule for Redirects"> | |
<match url=".*" /> | |
<conditions> | |
<add input="{Redirects:{REQUEST_URI}}" pattern="(.+)" /> | |
</conditions> | |
<action type="Redirect" url="{C:1}" appendQueryString="false" /> | |
</rule> | |
</rules> | |
<rewriteMaps> | |
<rewriteMap name="Redirects"> | |
<add key="/work.aspx" value="/our-work" /> | |
<add key="/services.aspx" value="/services" /> | |
<add key="/default.aspx" value="/" /> | |
</rewriteMap> | |
</rewriteMaps> | |
</rewrite> | |
</system.webServer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment