Redirecting to OWA & HTTP to HTTPS Automatically

Most Customers requires auto redirection from HTTP to HTTPS and to OWA virtual directory , here is the way on how to do it :

Redirecting to OWA Virtual Directory :

  1. Start the Internet Information Services (IIS) Manager snap-in.
  2. Expand the local computer, expand Sites, and then click Default Web Site.
  3. At the bottom of the Default Web Site Home pane, click Features View if this option is not already selected.
  4. In the IIS section, double-click HTTP Redirect.
  5. Click to select the Redirect requests to this destination check box.
  6. Type the absolute path of the /owa virtual directory. For example, type https://mail.contoso.com/owa.
  7. Under Redirect Behavior, click to select the Only redirect requests to content in this directory (not subdirectories) check box.
  8. In the Status code list, click Found (302).
  9. In the Actions pane, click Apply.
  10. For the new settings to take effect, open a Command Prompt window, and then type iisreset /noforce to restart IIS.

Redirecting to HTTPS from HTTP :

Open note pad create new file and paste the following code in it :

<!– beginning of HttpRedirect.htm file –>
<script type=”text/javascript”>
function redirectToHttps()
{
var httpURL = window.location.hostname + window.location.pathname;
var httpsURL = “https://&#8221; + httpURL ;
window.location = httpsURL ;
}
redirectToHttps();
</script>
<!– end of HttpRedirect.htm file –>

<!– beginning of HttpRedirect.htm file –><script type=”text/javascript”>function redirectToHttps(){var httpURL = window.location.hostname + window.location.pathname;var httpsURL = “https://&#8221; + httpURL ;window.location = httpsURL ;}redirectToHttps();</script>

<!– end of HttpRedirect.htm file –>

save it as “HttpRedirect.htm”

Now go to IIS Manager and create New Error Page with code 403.4

from response action click insert content from static location and from file path insert the Httpredirect.htm path

from Action Menu click edit feature settings , and select Custom Error Page and set the default page to the HttpRedirect.htm file path and that’s It.

Check Out the Photos for more info.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: