Copied to clipboard

Flag this post as spam?

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


  • Graeme W 113 posts 289 karma points
    21 days ago
    Graeme W
    0

    Redirect http requests to https

    I have the URL tracker package installed on Umbraco 6.16

    I need to redirect all http requests to https. Is something that can be done with this package? We have IIS 8

    Thanks in advance

  • Matthew Mirzai 28 posts 123 karma points
    21 days ago
    Matthew Mirzai
    0

    Hi Graeme,

    For something like this I would look to include a http -> https redirect within the web.config file, so it captures all http requests to the site.

    You'll need to install the URL Rewrite module found here for it to function, and there's a good guide to doing it in IIS 8 here.

    Hope that helps!

  • Amir Khan 1144 posts 2386 karma points
    21 days ago
    Amir Khan
    0

    Info on where to add a rule in your web.config here: https://our.umbraco.com/documentation/Reference/routing/iisrewriterules/

    Here's a rule you can use to remove www and force https:

    <rules>
        <rule name="Remove www" stopProcessing="true">
      <match url="(.*)" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll">
        <add input="{HTTP_HOST}" pattern="^www\.(.+)$" />
      </conditions>
      <action type="Redirect" url="http://{C:1}/{R:0}" appendQueryString="true" redirectType="Permanent" />
    </rule>
    <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> 
    </rules>
    
  • Graeme W 113 posts 289 karma points
    7 days ago
    Graeme W
    0

    Thanks for the replies. I have in fact already tried to install the IIS URL Rewrite module mentioned but it won't install properly. The application pools stop as soon as I try to run a website. I've tried all the fixes mentioned online without any joy.

    Hence looking for other workarounds such as maybe using this package without having to install the iis module

  • Amir Khan 1144 posts 2386 karma points
    7 days ago
    Amir Khan
    0

    I believe most, if not all, of the packages out there utilize that module as well.

    Are you getting errors when you try to install it? Also, can you provide any information on your hosting environment? All of our shared hosts, and even most of our other dedicated windows hosts have this module installed by default.

  • Graeme W 113 posts 289 karma points
    6 days ago
    Graeme W
    0

    Hi Amir

    We are running IIS8 on Windows Server 2012 R2

    The module appears to install ok and is visible within IIS. However as soon as a page is requested the application pool stops and the following error is left in the event log “The module DLL C:\Windows\system32\inetsvr\rewrite.dll failed to load. The data is the error”

    The only fixes I can find online are to repair or re-install the module which doesn't work for me. I've tried recycling the application pools

Please Sign in or register to post replies

Write your reply to:

Draft