Skip to content

Instantly share code, notes, and snippets.

@ramiabraham
Created September 18, 2015 00:08
Show Gist options
  • Save ramiabraham/da6eea478430731fecaf to your computer and use it in GitHub Desktop.
Save ramiabraham/da6eea478430731fecaf to your computer and use it in GitHub Desktop.
IIS web.config 301 and 302 redirect examples
<?xml version="1.0"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="http://foo.com/newdir" httpResponseStatus="Permanent" />
</system.webServer>
</configuration>
<?xml version="1.0"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="http://foo.com/newdir" httpResponseStatus="Temporary" />
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment