IIS 5 & IIS 6
behavior change in the http redirect module between IIS 7.0 and IIS 6...
Last post Aug 29, 2008 10:23 PM by ksingla
Aug 25, 2008 09:01 PM|sammy_1|LINK
There seems to different behavior in the http redirect module between IIS 7.0 and IIS 6.0.
In IIS 6.0 if you create a virtual directory and then redirect the virtual directory to some other locations the redirect is tied to the virtual directory alias/name, you
can create a second and third virtual directory with the same physical location and redirect to different locations. In IIS 6.0 multiple aliases can redirect to multiple locations with one physical location of the VD.
In IIS 7.0 the redirect is different, it is tied to the physical location, so user can create multiple virtual directories but when trying to redirect you can only redirect
to one location, because the http redirect seems to be tied to the physical location of the of the VD .
I tested this and confirmed that the above is the behavior.
If you can confirm this behavior please communicate back, the question here
is the new behavior is a BUG or a new feature behavior?.
Aug 29, 2008 01:30 PM|ksingla|LINK
I think you have your redirect rules in web.config which is in root of your virtual directory. You can put different redirect rules in applicationHost.config under location tags for different virtual directories which will make sure different vdirs get different
redirect behavior. Redirect rules in web.config of vdir root will get picked for all vdirs pointing to this location. In IIS6, we didn't have distributed config. So this problem didn't exist. Let me know if you have trouble moving the rules to applicationHost.config.
Aug 29, 2008 02:42 PM|sammy_1|LINK
Aug 29, 2008 10:23 PM|ksingla|LINK
If you append -commit:apphost to the appcmd command you are using, it will write the configuration to applicationHost.config which will make this configuration effective only for a particular site/app/vdir.