title: Redirect a domain to another domain in ASP.NET
body: <p>I have a website with <code>two domains</code> and <code>one hosting server</code> that worked fine with this two URL.<br>
  domains are <code>www.jongeshadi.com</code> and <code>www.jongeshadi.ir</code>.<br>
  I want when a user typed <code>www.jongeshadi.ir</code>redirect to <code>www.jongeshadi.com</code>.<br>
  I Google it and find some solution such as change web config to:  </p>
  
  <pre><code>&lt;rewrite&gt;
          &lt;globalRules&gt;
            &lt;rule name="Redirects to www.jomgeshadi.com" patternSyntax="ECMAScript" stopProcessing="true"&gt;
              &lt;match url=".*" /&gt;
              &lt;conditions logicalGrouping="MatchAny"&gt;
                &lt;add input="{HTTP_HOST}" pattern="^jongeshadi.*(ir|com)$" /&gt;
                &lt;add input="{HTTP_HOST}" pattern="^(www.)?jonsgeshadi.(ir|com)$" /&gt;
                &lt;add input="{HTTP_HOST}" pattern="^www.jongeshadi.com$" /&gt;
              &lt;/conditions&gt;
              &lt;action type="Redirect" url="http://www.domain.ir/{R:0}" /&gt;
            &lt;/rule&gt;
          &lt;/globalRules&gt;
      &lt;/rewrite&gt;  
  </code></pre>
  
  <p>But it doesn't worked.any thing is mistake or is there other solution?</p>