How to automatically redired all http traffic to https on Exchange 2007
Tuesday 01 September 2009
Users often don't remember to use https:// when access Outlook Web Access, they simply just use https://. So to automatically redirect them to the same address but with https:// simply follow the below:
1) Logon to your exchange server
2) Open 'My Computer'
3) Navigate to: 'c:\Inetpub\wwwroot'
4) You should see two files, 'default.aspx' and 'default.aspx.vb' open them both in notepad and make sure they look like the below (if they don't exist, create them and make sure they are saved under the same names):
default.aspx
-
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="default.aspx.vb" Inherits="login" Debug="true" %>
-
-
<html>
-
<head>
-
</head>
-
<body>
-
</body>
-
</html>
default.aspx.vb
- Imports System.Data
- Imports System.Data.SqlClient
- Imports System.Security.Cryptography
-
- Partial Class login
- Inherits System.Web.UI.Page
-
- Public Sub Page_Load()
- If Not Page.IsPostBack Then
- BindData()
- End If
- End Sub
-
- Private Sub BindData()
- If Request.IsSecureConnection Then
- Response.Redirect("/owa")
- Else
- Response.Redirect("https://" & Request.ServerVariables("HTTP_HOST") & "/owa")
- End If
- End Sub
-
- End Class
The important things to remember is that where in my example you see reference to /owa is for Exchange 2007 and earlier versions, if I remember correctly are /exchange or /exhweb, but to check this login to your Outlook Web Access account and take note to the later part of the address.
It's also important that in your default.aspx file the option 'AutoEventWireup is set to true, as above.
|
(1)
|
|
|