ASP.Net rewrite rule from one domain to a similar domain
<p>I am trying to write a rewrite rule that will take www.mydomain1.co.uk/* and rewrite to www.mydomain2.co.uk/*</p>

<p>I have the following rule that isn't working as I suspect it gets into a infinite loop.</p>

<p>Can anyone help please</p>

<pre><code>    &lt;rule name="Canonical Host Name" stopProcessing="true"&gt;
      &lt;match url="(.*)" /&gt;
      &lt;conditions&gt;
        &lt;add input="{HTTP_HOST}" negate="true" pattern="^mydomain1\.co\.uk/$" /&gt;
      &lt;/conditions&gt;
      &lt;action type="Redirect" url="http://www.mydomain10.co.uk/{R:1}" redirectType="Permanent" /&gt;
    &lt;/rule&gt;
</code></pre>
