Follow

How Can I Redirect HTTP Requests to HTTPS?

Sometimes you may need to redirect all HTTP requests to HTTPS instead of configuring the portal to answer only on port 443 (HTTPS). In that case, here's the recipe to do so;

1. For 64-bit installations, download and install URL Rewrite Module from http://download.microsoft.com/download/D/D/E/DDE57C26-C62C-4C59-A1BB-31D58B36ADA2/rewrite_amd64_en-US.msi

2. Restart WWW service from the Services snap-in on Windows
3. Place the below rewrite rule under <system.webServer> section

  <rewrite>
    <rules>
    <rule name="HTTP to HTTPS redirect" stopProcessing="true">
  <match url="(.*)" />
    <conditions>
      <add input="{HTTPS}" pattern="off" ignoreCase="true" />
    </conditions>
  <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
    </rules>
</rewrite>

 
4. Make sure any http requests to the site is redirected to https by requesting something like http://portalserver/ in your browser.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk