Base solution for your next web application
Open Closed

HTTPS ? #126


User avatar
0
gvb created

Hey,

I got an SSL certificate, so now I can go to my website with HTTPS and HTTP, but how can I force the use of HTTPS?

thx in advance!


2 Answer(s)
  • User Avatar
    0
    gvb created

    i just found this!

    It force all page to use HTTPS so it's not about ABP, may be there is other way to do it but here is what i've found finally!!

    we need to add this to <system.webServer>

    <rewrite>
          <rules>
            <rule name="Force HTTPS" enabled="true">
              <match url="(.*)" ignoreCase="false" />
              <conditions>
                <add input="{HTTPS}" pattern="off" />
              </conditions>
              <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
            </rule>
          </rules>
        </rewrite>
    
  • User Avatar
    0
    hikalkan created
    Support Team

    Thanks for information sharing.