If OWA requires SSL encryption and users forget to type the HTTPS:// prefix, they may encounter an error message....
Luckily, you can set up a custom error message using some quick HTML code to redirect Outlook Web Access users to the appropriate site.
If users don't enter the HTTPS:// prefix before an OWA URL, they'll see an error message similar to that in Figure 1.
Internet Information Services (IIS) doesn't have any built-in mechanisms to automatically redirect HTTP requests to HTTPS. But it's still possible.
IIS allows you to create custom error messages that display when errors occur. You can customize the error message shown in Figure 1 to automatically redirect users to the appropriate site. The actual error code is 403;4.
Custom error messages are implemented on a site-by-site basis. Open the IIS Manager console and navigate through the console tree to: Web Sites -> Default Web Site. Right-click on the container and choose Properties.
Windows will display the properties sheet for the default website. Go to the properties sheet's Custom Errors tab and locate error number 403;4, shown in Figure 2.
There is an individual file associated with each error message. You can note which file is being used and then modify that file or you can create an entirely new file and tell IIS to use it as a custom error message.
In either case, select the 403;4 error and click Edit. This will display the full path and filename of the file used by the error message. This will also give you a chance to inform IIS to use a different file when 403;4 errors occur.
No matter which approach you use, your custom error message needs to be in HTML format. I suggest creating a simple HTML file that performs an automatic redirection. It may be helpful to include a link for users -- in case they aren't automatically redirected.
Here is a simple block of HTML code that you can cut and paste into your custom error message:
<title>Automatic OWA Redirection <META HTTP-EQUIV="Refresh" CONTENT="0; URL=https:// <servername>/exchange">
If you are not automatically redirected, click <a href="https:// <servername>/exchange/">here</a>to access OWA.<br>
The third line of code performs the actual redirection. You'll need to replace https://<servername>/exchange with the actual URL that you want to redirect your users to. This is also true for the URL that's embedded in the second to last line of code.
In the third line of code, I set CONTENT= "0." This instructs the Web browser to perform the redirection immediately. Unfortunately, this can cause problems with some browsers.
Previously, you may have seen situations where Websites disable the Back button so that users cannot leave the page. This code can sometimes have the same effect.
If a redirection occurs too quickly, a user may not be able to use the back button to go back to the previous page. If this is a problem, I suggest changing the 0 to a higher number. The number that appears just after CONTENT=" reflects the number of seconds to wait before performing the redirection. Waiting 2 or 3 seconds should be sufficient.
About the author: Brien M. Posey, MCSE, is a five-time recipient of Microsoft's Most Valuable Professional award for his work with Exchange Server, Windows Server, Internet Information Services (IIS), and File Systems and Storage. Brien has served as CIO for a nationwide chain of hospitals and was once responsible for the Department of Information Management at Fort Knox. As a freelance technical writer, Brien has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal website at www.brienposey.com.
Do you have comments on this tip? Let us know.
Do you know a helpful Exchange Server, Microsoft Outlook or SharePoint tip, timesaver or workaround? Email the editors to talk about writing for SearchExchange.com.