0

I am trying to force SSL redirection on a website through IIS 7 (Server 2008) using the following:

<rule name="Redirect to HTTPS" stopProcessing="true">
    <match url="(.*)" />
    <conditions>
        <add input="{HTTPS}" pattern="^OFF$" />
    </conditions>
    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>

When I am on the server that IIS is hosted on, this works perfectly. If I try to access the site from any other computer I am met with an error that the website cannot be displayed. Anyone have any tips about this?

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
AndrewHPI
  • 1
  • 2

1 Answers1

0

Try This:

<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions><add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>

In Summary, if you are using the url rewrite module then check the following:

"Append query strings" is checked and Redirect Type is set to: "See other(303)"

Or Follow the screen caps enter image description here

enter image description here

zman
  • 633
  • 6
  • 14