I would like to replace my old domain (oldsite.com) with (newsite.com) and permanently redirect my users. I have the following in my application web.config file:
<rule name="Redirect to new site" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" negate="true" pattern="^oldsite\.com$" />
</conditions>
<action type="Redirect" url="http://newsite.com/{R:1}" redirectType="Permanent" />
</rule>
When I connect to my website, I see that it correctly gets redirected to newsite.com but that goes into an endless loop. Is there anything wrong with this rewrite rule?