Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Wriggle 4 posts 74 karma points
    Apr 25, 2018 @ 08:29
    Wriggle
    0

    7.3.4 HTTP to HTTPS

    I have an Umbraco installation - 7.3.4 on IIS10 and I have a SSL installed with the binding to the site.

    I'm having issues getting the site to use HTTPS. Navigating to the HTTPS version of a page redirects to HTTP.

    In my web.config I have the following values both set to true: siteUseSSL umbracoUseSSL

    The backend login is served over HTTPS but not the frontend. I have tried a URL rewrite redirect in IIS but this gives me a 'ERR TOO MANY REDIRECTS' error in Chrome.

    Not sure what can be the issue?

    Thanks in advance

  • Søren Mastrup 122 posts 564 karma points c-trib
    Apr 25, 2018 @ 11:43
    Søren Mastrup
    0

    I have never heard about "siteUseSSL" in web.config.

    The following rule will redirect from HTTP to HTTPS.
    Add it to your web.config.

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

    You can read more about it on cultiv.nl

  • Wriggle 4 posts 74 karma points
    Apr 25, 2018 @ 11:45
    Wriggle
    0

    Hi

    I can't get to a HTTPS url on the site as it redirects to HTTP everytime, hence the redirect loop...

  • Søren Mastrup 122 posts 564 karma points c-trib
    Apr 25, 2018 @ 11:47
    Søren Mastrup
    0

    Could it be your browser remembering the old redirect?

    Try clearing your browser cache.

  • Wriggle 4 posts 74 karma points
    Apr 25, 2018 @ 11:49
    Wriggle
    0

    No, it's definitely not that as I have tried in various browsers and incognito mode etc.

    I can't see anything in Umbraco source code or the database that is forcing the HTTP

  • Søren Mastrup 122 posts 564 karma points c-trib
    Apr 25, 2018 @ 11:53
    Søren Mastrup
    0

    As standard Umbraco don't have anything that forces https in the frontend. Have you made some custom implementation, since siteUseSSL is added to your web.config?

    Have you added a redirect in your UrlRewriting.config?

  • Wriggle 4 posts 74 karma points
    Apr 25, 2018 @ 11:59
    Wriggle
    0

    It's a site I got given to host from another company so not sure.

    UrlRewriting.config has no rules in it.

  • Søren Mastrup 122 posts 564 karma points c-trib
    Apr 25, 2018 @ 12:28
    Søren Mastrup
    0

    Then I suspect you have some custom implementation somewhere in your site, since Umbraco, as standard, doesn't provide any option to force HTTPS in the frontend.

Please Sign in or register to post replies

Write your reply to:

Draft