Permanent Redirects

You may know how the web address for Outlook Web Access always ends in /exchange, which is okay in a link but not if you’re trying to tell people the address. If anyone happens to go to the home page of the site, they get a “no home page” error.

Exchange default home page errorExchange server default home page!

Since the webroot for IIS on Exchange server is just about empty, so you can easily replace the default page if you like with a permanent redirect. I also found a great summary of this technique applied in different programming languages at Permanent Redirects with HTTP 301. Here’s the code for ASP, which is enabled by default on your Exchange server.

<%@ Language=VBScript %>
<% ' Permanent redirection Response.Status = "301 Moved Permanently" Response.AddHeader "Location", "http://www.yourdomain.com/" Response.End %>

This technique is useful anywhere you would like an easy redirect to another directory and you don’t have access to a .htaccess file (Linux) or the IIS admin interface (Windows).

Of course, it’s easier in PERL with CGI.pm or in PHP.

header("Location:http://www.yourdomain.com");

Comments are closed.