title: How to redirect a website from HTTP to HTTPS without using URL Rewrite?
body: <p>I have tried it using <strong>URL Rewrite</strong> it works fine, but i wanted to know if there is another best solution </p>
  
  <pre><code>&lt;rewrite&gt;
          &lt;rules&gt;
              &lt;rule name="HTTP to HTTPS " enabled="true" stop Processing="true"&gt;
                  &lt;match URL="(.*)" /&gt;
                  &lt;conditions&gt;
                      &lt;add input="{HTTPS}" pattern="off" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Redirect" URL="https://{HTTP_HOST}/{R:1}" /&gt;
              &lt;/rule&gt; 
          &lt;/rules&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is the code i have used for redirection</p>