Home > Custom error message redirects OWA users
Tutorial:
EMAIL THIS

Custom error message redirects OWA users

14 Aug 2009 | SearchExchange.com

Exchange Server tips, tutorials and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google

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.

Forgetting to use the HTTPS:// prefix
Figure 1. Users receive this error message if SSL encryption is required and they don't use the HTTPS:// prefix.

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.

HTTP error 403;4
Figure 2. Locate HTTP error code 403;4.

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:

<head>
<title>Automatic OWA Redirection <META HTTP-EQUIV="Refresh" CONTENT="0; URL=https:// <servername>/exchange">
<head>
<body>
If you are not automatically redirected, click <a href="https:// <servername>/exchange/">here</a>to access OWA.<br>
</body>

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.
More on Outlook Web Access:
Troubleshoot IIS metabase corruption in Outlook Web Access

Detecting update rollup and patch failures in OWA

Troubleshooting Microsoft Outlook Web Access logon issues

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.

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Outlook and Outlook Web Access Tips
Outlook 2007 shut-down problems and fixes
OWA 2007 configuration tricks to boost performance
Pros and cons of Outlook 2007's storage engine redesign
Lock down direct file access and protect OWA users
Simplify an OWA URL on Windows Server 2008
Windows Mobile 6.5 touts Internet Explorer, OWA improvements
When OWA's default configurations aren't good enough
Save time typing Outlook 2007 messages with Quick Parts
Troubleshoot Microsoft Outlook Web Access problems
Control Outlook 2007 in cached mode settings with group policies

Microsoft Outlook
Outlook 2007 shut-down problems and fixes
Microsoft Outlook and SharePoint calendar dos and don'ts
Free tools facilitate large-scale Outlook and SharePoint integrations
Exchange Mailbag: POP3 settings and Outlook issues
Pros and cons of Outlook 2007's storage engine redesign
Fix Outlook 2007 and SharePoint synchronization breaks
Email issues after configuring hosted Exchange server on laptop
Avoid Outlook 2007 performance issues during repairs
A behind-the-scenes look at Outlook 2007 and SharePoint integration
When to use a self-signed certificate with Exchange Server 2007
Microsoft Outlook Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
bacn  (SearchExchange.com)
email bankruptcy  (SearchExchange.com)
offline folder file  (SearchExchange.com)
OST file  (SearchExchange.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary




E-mail Administration Tips - Active Directory, Mail Protocols, MOM
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts