Home »
Code Examples »
ASP.Net Code Examples
ASP.Net - Configure the redirect rules in IIS Code Example
The code for Configure the redirect rules in IIS
<rewrite>
<rules>
<rule name="[RULE NAME]" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny" trackAllCaptures="false">
<add input="{HTTP_HOST}{REQUEST_URI}" pattern="[OLD URL]" />
</conditions>
<action type="Redirect" url="http://[NEW URL]/{R:1}" redirectType="Permanent"/>
</rule>
</rules>
</rewrite>