Project Description
An IHttpModule that maps subdomains to subdirectory applications to give the appearance of the application running at the root directory of the subdomain.

For example, instead of serving a blog at http://dandoes.net/blog, it could be served at http://blog.dandoes.net. This can be done for any number of applications.

This project is intended for people that use shared hosting, but are not able to have multiple IIS web sites.

Overview

This IHttpModule will allow developers using shared hosting map different domains and subdomains to specific applications without using 301/302 redirects, and without having subdirectories in the URL. This is usually accomplished by configuring several IIS sites whose bindings share the same IP address, but specify different host names, which is generally not available to shared hosting customers.

Caveats

  • All applications may need to share a single Application Pool - though, in a shared hosting environment, this is generally not an option anyways.
  • This has been tested on DiscountASP.NET's IIS7/Windows Server 2003 shared hosting. For other web hosts and/or configurations, Your Mileage May Vary.
  • I have not done any performance testing on this IHttpModule. I'm assuming there is a performance hit involved in doing any additional processing, including on static resources. Though, if you're on shared hosting, I'm guessing you aren't likely to be serving lots of traffic.
  • Effective use of this module on DiscountASP.NET requires either the subdomains addon or having additional root domain pointers. For other hosts, check with technical support or sales to see if they support subdomains or hosting multiple domain names.

Installation/Setup

Last edited Sep 4, 2008 at 10:00 PM by DanielSchaffer, version 9