amset

.info
.co.uk - exchange consultancy
.net - internet based solutions
Have your Exchange server installed, maintained or
upgraded by Amset IT Solutions.
Exchange 2000, 2003, 2003 SBS, 2007
More Information (UK only)

Broadband - Exchange
Login Scripts - Net Admin
Outlook - Windows Mobile
Windows

Contact - Advertise

AddThis Social Bookmark Button

Exchange Server

Exchange Consultancy


Amazon Store


Basic Email Gateway Server

Company wide Contact List

Disabled User Account

Distribution Lists

DNS Configuration

Exchange and a
Dynamic IP Address

Event ID 1221

Filter Unknown Users

Global Mailbox Folder
Permissions from Server

Intelligent Message Filter

Internal Email Address
for External People

Internet Tools

Mailbox and Management
Account

Message Tracking

Migrating to a new server

Multiple Domains

Offline Address Book Errors

Options when a Staff Member
Leaves

Outlook Web Access

PDAs, OMA and EAS

Permissions Best Practises

Post Install Configuration

Public Folders

Prerequisites for Exchange
System Tools

RPC over HTTPS

Secure your SMTP Relay

Shutdown Script

SMTP Services and Exchange

SMTP Diagnostics

Spam Cleanup

Switching From POP3
to SMTP Delivery

Telnet Test

Tools for Admin of
Exchange Server

Username Change

Exchange Server
Compatibility Information
Exchange
Server Version
Compatibility
5.5 Yes
2000 Yes
2003 Yes
2007 Yes
OWA - Redirect Pages

Author: Simon Butler, Exchange MVP, MCSE
Last Page Review: 22/06/2008

OWA Section Home Page

As a good Exchange administrator you should be deploying SSL on to your Outlook Web Access.
To further increase the security of your network, you should stop http traffic coming in, by allowing just port 443, not port 80.

However, this change will cause complaints from users, who don't want to have to remember to put in the https in front of the URL. You could just tell the users to get used to it (and in most cases they will) but usually the administrator is forced to come up with a compromise, and put in a redirect.

The Microsoft Method

This is the way that Microsoft ask you to do it: http://support.microsoft.com/default.aspx?kbid=839357 

The flaw with that method is that you must open port 80 on your web site and also reconfigure IIS to use the replacement page.

The Amset IT Solutions Method

This is the way that we offer this facility, which uses the public web site of the client, but needs to have a site that supports ASP.

  1. Create a new page on your public web site that has a url that the users can remember... for example
    http:// www domain .com /email/
     
  2. Copy and paste the following code in to notepad, and save it as default.asp

    <% response.redirect "https://mail.domain.com/exchange" %>

Yet this method can be further enhanced.

If you have deployed Outlook Mobile Access (OMA) as well (Exchange 2003 only), then you can change the code to the following...

<%
If InStr(Request.ServerVariables("HTTP_USER_AGENT"),"Windows CE") > 0 Then
response.redirect "https://mail.domain.com/oma"
End If %>
<% response.redirect "https://mail.domain.com/exchange" %>

What this code does is detect that the client is a Pocket PC device and redirect the browser to the OMA page. If the client isn't a pocket PC, then they get the regular OWA login page.

Combining this code with the default web page configuration change
(Exchange 2003 Only)

If you have made the modification to present the Exchange 2003 forms based authentication page to the users as the default when they hit https:// mail domain.com so that they don't have to put the /exchange at the end, then you can combine this code with that change so that a mobile client is redirected to OMA.

This requires a change to the page that is presented to the client.

This guide is based on English language locations within Exchange. If you are using non-English pages then you will need to adjust those as required.
It is of no use to Exchange 2007 users as Exchange 2007 does not have OMA.

  1. Find the file logon.asp in the following location: \Exchsrvr\exchweb\bin\auth\usa and take a backup copy of it.
  2. Open the file in notepad.
  3. Scroll down the page until you find <!-- <%=sGuid%> -->, which has "<!DOCTYPE HTML PUBLIC". Immediately below it.
    Immediately above <!-- <%=sGuid%> -->, paste the following code:

    <%
    If InStr(Request.ServerVariables("HTTP_USER_AGENT"),"Windows CE") > 0 Then
    response.redirect "https://mail.domain.com/oma"
    End If %>


    The resulting code should look like this:

    If Err.Number <> 0 Then
    Err.Clear
    End If
    End Function

    %>
    <%
    If InStr(Request.ServerVariables("HTTP_USER_AGENT"),"Windows CE") > 0 Then
    response.redirect "https://home.amset.net/oma"
    End If %>
    <!-- <%=sGuid%> -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!--Copyright (c) 2000-2003 Microsoft Corporation. All rights reserved.-->

     
  4. Save the page and take a backup of the modified page. It may get overwritten by any patches or updates. If you update the server in the future, check the page to see if it has been modified - if so, place your additional code in the same place. Don't replace the new page with your old one as it may cause a compatibility issue.

Questions

Q: What Happens if the user has changed their browser identification code?
A: It will not work, because the server thinks it is a real PC and not a Pocket PC. The user needs to put the registry change back. 

Q: Our corporate web site doesn't support ASP, is there a PHP version of this code?
A: You can probably recreate the above sequence in PHP, but we don't have those skills in house.

 

Sponsored Links

Last Page Update:
22/06/2008

Back to the Top
Contact Us - Advertise on amset.info
Exchange Index - Home Page


Broadband - Exchange - Login Scripts - Network Admin - Outlook - Windows Mobile - Windows


© Amset IT Solutions Ltd. 1998 - 2008. All rights reserved. Reproduction of any content on this web site is prohibited without express written consent. Use of this web site is subject to our terms and conditions. All trademarks and registered trademarks are property of their respective owners. This site is not endorsed or recommended by any company or organisation mentioned on this site. This site is to provide guidance only and as such we cannot be held responsible for any consequences of following the advice given.