Have you ever wanted to manage multiple domain names under a single account in IIS (Internet Information Services)? A common way to do this is to handle it from code. There are some disadvantages when handling this directly from code. Static pages aren't redirected, non-developers will need to purchase or dust off their programming books, and evidence remains that a redirection was done.Along came ISAPI Rewrite www.isapirewrite.com to solve this issue. Running at
ISAPI level in IIS, this is done before any page or code is accessed so it works equally well on static and dynamic content. It overcomes all
objections mentioned above.
With common redirection code,
user would see something like this: http://www.domain1.com http://www.domain2.com/domain2 http://www.domain3.com/domain3
With
ISAPI Rewrite component,
user will see this: http://www.domain1.com http://www.domain2.com http://www.domain3.com
Even though behind
scenes
sites can be in completely different sub-folders,
person visiting
website won't have any concept of this. They will simply see
clean domain names.
ISAPI Rewrite will rewrite (kind of like a redirect)
user to a sub-folder even though
web browser doesn't realize this.
This is done very fast and efficiently and managed by a file called httpd.ini which should be placed in
root of
site. It controls which domain names are handled by which sub-folder by utilizing different regular expression rules.
Some tips to remember when creating
rules.
# is used to comment out a line