HTTP To HTTPS Redirect via Web.Config

Follow

SecureAuth version affected: All iterations of SecureAuth IdP with URL Rewrite

Description:

To leverage redirecting users from http to https instead of denying connection

Cause:

N/A

Resolution:

Please add the following code to your web.config of IIS.

 

  1. Find where your IIS is located; either C: or D:
    Navigate to the directory below.

    NOTE***Your instance could be in D:, depending on your setup.

    %systemdrive%\inetpub\wwwroot


  2. Once here, open up web.config and add the following:

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

Save it and you're done!  No more denying HTTP and watch URL rewrite do it's work.

 

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.