IIS 7 - Multiple IIS Sites pointed at same directory. How is this accomplished?

Solution 1:

From my experience you won't be able to do this directly with IIS7 since the majority of the configuration settings are stored within a file inside the directory.

For example, I had a fake folder C:\Webs\NoWebSite that I had configured multiple sites to use as they were going to be purely for redirection.

After setting up the first site's redirections, I started working on the second and noticed all my redirection settings from the first site were on the second.

Anything I changed on the second applied back to the first again.

So I had to make individual folders for them to sit on even though there was no content.

A thought would be to try and do it by having the actual content hosted under one domain and then setup the others to use Rewrites to the actual content if it passes the restrictions.

See these about the URL Rewrite extension
http://www.iis.net/download/URLRewrite
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/

Rewriting happens behind the scenes, the user doesn't know there were any changes to the address, just the server pulls the content from the rewritten location. This is different from a redirection where the server tells the browser to go get the information from a different location. Using rewrites, you can keep your domain1.com and domain2.com visible to the user but actually be serving the information off of domain3.com for example.