title: How to redirect http to https and index.html together on IIS in React single page application?
body: <p>We have a single page application, made in React JS and deployed on IIS. HTTPS certificate is already setup on the server and our application runs all fine on HTTPS. I want to redirect all calls from HTTP to HTTPS. Here is how my web.config file looks like on the server. Can you please help me with what rule should I add in it and where to transfer my HTTP calls to HTTPS?</p>
  
  <pre><code>&lt;configuration&gt;
  &lt;system.webServer&gt;
      &lt;rewrite&gt;
          &lt;rules&gt;                     
              &lt;rule name="rewrite index to index.html"&gt;
                   &lt;match url=".*" ignoreCase="false" /&gt;
                   &lt;conditions logicalGrouping="MatchAll"&gt;
                      &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
                      &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
                      &lt;add input="{REQUEST_URI}" pattern="/ABC/api/*" negate="true" /&gt;
                   &lt;/conditions&gt;
                   &lt;action type="Rewrite" url="index.html" appendQueryString="true" /&gt;
              &lt;/rule&gt; 
  
          &lt;/rules&gt;            
      &lt;/rewrite&gt;
      &lt;staticContent&gt;
      &lt;mimeMap fileExtension="." mimeType="text/html" /&gt;
      &lt;/staticContent&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>    </p>