Link to home
Start Free TrialLog in
Avatar of chspayroll
chspayroll

asked on

Redirect to HTTPS

Hi There,

For the life of me I cannot get the http to redirect to https. Everything is supposed to be secure but as of now you can get to the non-secure version.

If I enable the redirect from within the IIS gui to "https://<FULL DOMAIN>" and then go to the site, I get a message that the site is in an infinite loop?

Thanks for your help!
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chspayroll
chspayroll

ASKER

Thanks, I've installed the url rewrite module but I can't reboot until later, I'll keep you posted
Perfect! But I had to use the following code:

<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>