Category Archives: windows server

Redirect to another domain using web.config file

<?xml version=”1.0″ encoding=”UTF-8″?>

<configuration>

<system.webServer>

<rewrite>

<rules>

<rule name=”Redirect to newdomain.com”>
<match url=”(.*)” />
<conditions>
<add input=”{SERVER_PORT}” pattern=”443″ negate=”true” />
</conditions>
<action type=”Redirect” url=”http://www.newdomain.com/{R:1}” />
</rule>
</rules>

</rewrite>

</system.webServer>

</configuration>