Wednesday, September 23, 2015

Redirect http to https in IIS using URL ReWrite module

Suggested Videos
Part 99 - Implementing Enable button to unlock user accounts
Part 100 - Secure Socket Layer in
Part 101 - Implementing SSL in web application

In this video we will discuss about redirecting users from HTTP to HTTPS. In the previous session, we discussed about implementing SSL in Please watch Part 101, before proceeding with this video.

To redirect users from HTTP to HTTPS automatically, there are several ways. In this video we will discuss about using "url rewrite" module. There are 3 simple steps

Step 1:
Please download and install "URL ReWrite" module from the following link.

Step 2:
Uncheck "Require SSL" option from "SSL Settings" for the web application in IIS.

Step 3:
Copy and paste the following in the root web.config file of your application.
    <httpRedirect enabled="false" destination="" httpResponseStatus="Found" />
            <rule name="HTTP to HTTPS Redirection" stopProcessing="true">
                <match url="(.*)" />
                    <add input="{HTTPS}" pattern="off" />
                <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />

Now try to navigate to the application using HTTP, you will automatically be redirected to HTTPS.

These rules can also be created in IIS directly using the "URL Rewrite" module

In the next video we will discuss about using "IIS Error Pages" to redirect users from HTTP to HTTPS automatically.

If you are searching life partner. your searching end with now offer free matrimonial website which offer free message, free chat, free view contact information. so register here : Free matrimonial website