title: IIS url rewrite Rules With domain change and https
body: <p>I used below code for http to https redirect, but don't know how to update domain and https at same time with multiple rules.</p>
  <p>Thanks for your help</p>
  <pre><code>&lt;!--Examples--&gt;
      Example 1:
      
      input          : http://prodServer/MyApplication        
      Expected Output: https://prodServer.mycompany.com/MyApplication
      
      Example 2:
  
      input            : https://prodServer/MyApplication        
      Expected Output: https://prodServer.mycompany.com/MyApplication
      
      Example 3   
          
      input            : http://prodServer.mycompany.com/MyApplication        
      Expected Output  : https://prodServer.mycompany.com/MyApplication
  </code></pre>
  <p>code</p>
  <pre><code> &lt;system.webServer&gt;
              &lt;rewrite&gt;
                &lt;rules&gt;
                  &lt;rule name=&quot;httpsRedirect&quot; stopProcessing=&quot;true&quot;&gt;
                    &lt;match url=&quot;(.*)&quot; /&gt;
                    &lt;conditions&gt;
                      &lt;add input=&quot;{HTTPS}&quot; pattern=&quot;^OFF$&quot; /&gt;
                    &lt;/conditions&gt;
                    &lt;action type=&quot;Redirect&quot; url=&quot;https://{HTTP_HOST}{REQUEST_URI}&quot; appendQueryString=&quot;false&quot; /&gt;
                  &lt;/rule&gt;
                &lt;/rules&gt;
              &lt;/rewrite&gt;
   &lt;/system.webServer&gt;
  </code></pre>