I'm trying to add a new web site on an existing IIS v7 which has its default web site installed. My problem is that I have conflict since I can't give:
Different host name
Different local IP
Different port
I was asked to try and do the following. Lets say the default web site can be accessed through www.something.com, than I should try to configure the new web site with www.something.com/new_web_site
Is it possible from the web site configuration?
Is it possible to put some kind of redirect page in a sub folder name new_web_site under the default web site physical location that will redirect the real physical location of the new web site files?
Best Answer
A combination of ARR and rewrite rules will solve this nicely. Here's the steps to follow:
Create a web.config file for the "Default" website, and write your routing rules there:
You may have to fiddle somewhat with your rewrite rules, you can experiment using the URL Rewrite Module applet on IIS, and read more about it here: http://learn.iis.net/page.aspx/500/testing-rewrite-rule-patterns/ For further help be sure and browse Ruslan Yakushev's blog: http://ruslany.net/
This will give you three completely separate websites, accessibly through a single facade on port 80 (though of course you can hit each website directly on port 81 and 82 if you need to: http://localhost:81/default.aspx for example.