Steps to Enable the Auto Redirection of HTTP to HTTPS:
Now, let us consider how to redirect an HTTP request to HTTPS together with the Exchange virtual directory. The below steps will help you to achieve that as well.
Open Notepad, copy the code below and save it as redirect.htm in the x\inetpub\wwwroot folder. Where 'x' is your IIS installation drive.<html>
<head> <meta http-equiv="Content-Type" content="text/html;
charset=windows-1252"> <meta http-equiv="refresh"
name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId"
Note – replace/modify the mail.exchangedictionary.com with your OWA domain URL.
- On the properties of your Default Web Site, go to the Documents Tab. Add redirect.htm to the list of documents, and move it to the top of the list. This ensures that the server checks for the redirect.htm file first and if it finds it, it will execute it. Otherwise will go further down to execute below solution.
- Open up notepad again and paste the following code. Do not modify it. Save the file as owahttps.asp.
If Request.ServerVariables("SERVER_PORT")=80 Then
strSecureURL = "https://"
strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")
strSecureURL = strSecureURL & "/exchange"
- In Windows Explorer, navigate to the wwwroot folder (x:\inetpub\wwwroot where x is the drive IIS is installed) and create a new folder called owaasp. Place the owahttps.asp file into this directory. Once the directory is created, it should show up in IIS admin.
- The next step is to modify the Custom error for 403;4 (SSL required). Go into the properties of the Exchange Virtual Directory, and go to the Custom Errors tab. Scroll down and find 403;4 and choose Edit Properties. Change the message type to URL and in the URL, type, /owaasp/owahttps.asp.
- If the Application Pool is not available, Click the Create button next to Application Name and then you will be able to select the Application Pool. Once this is configured, requeststo http://servername.domain.com will now be redirected to https://servername.domain.com/exchange
- Open a Command Prompt window, and then type iisreset /noforce to restart IIS
Hope this will help you in executing the request step by step.
Note - This is applicable to Exchange 2003.
You may also refer the Technet article, that will help you to configure the other versions of Exchange Server as well.