ASP.NET App in Subfolder using Rewriter Does not work

Discussion in 'DNS/Domain names' started by clarity4, Apr 8, 2010.

  1. Like many other users here, I signed up with the understanding the unlimited domains would mean that I could host more than one website on my account. While this is possible using multiple sites (at additional cost), it does not appear to be possible using the IIS 7 ver 1.1 Rewrite module as some - including Winhost - have suggested.

    I have gone round and round with this and here is what I have found:

    1. You can easily make a rewrite rule in IIS 7 to rewrite the domain typed into the browser before it hits the ASP.NET app. For example, you can have be rewritten to before the app ever gets the request. This works great and essentially allows you to map your www. prefix to a particular subfolder.

    2. The idea would then be to map other portions of my website, such as a knowledgebase application, for example, to another subfolder such as Since this is rather poor site appearance, I would rather have a subdomain mapped there, such as Using the Rewriter module, this is also easily done.

    Here's the rub, though. The rewrite is done before the application sees the request. As far as the app knows, the original request looks like "", not "". All postbacks, controls and the like within the application create postbacks and links to the location. This is NOT what I want.

    I understand that version 2.0 of the rewriter provides the corresponding funcionality of rewriting the output of the app back to the browser. Winhost seems to think that version 1.1 can do this somehow, but I just don't see it - even people whose sites are now "successfully" using rewriting seem to have the subfolder issue on postback.

    (See posting or visit for an example)

    Has anyone else ACTUALLY gotten this to work using version 1.1? Am I just missing something terribly obvious.

    NOTE: I really am not looking to hack up the application placed in the folders. Some of them are commercial apps for which I likely cannot even get the source. The solution here needs to be completely handled by the hosting service/configuration, not by programming in redirects and rewrites into the app itself.

    I am just about to give up on this whole deal and just leave the subfolders out there until Winhost releases Version 2.0 of the rewrite module.

    Last edited by a moderator: Oct 14, 2015
  2. Ray


    That's a good point you made and I wonder if this maybe one of the main issues I see with WCF applications do some kind of rewriting?

    Unfortunately with IIS 7 setup as a shared hosting environment we cannot implement the redirect on the server. So I'm afraid it still has to be done programmatically.

    However, our managers are in serious discussion of offering URL Rewrite version 2.0. I suggest you keep in touch with this forum and once they have made a final decision I'll be sur to post it right away.
  3. Any planned dates for ReWrite 2?

    I too use WCF and don't want to mess around with sub-domains if it isn't solid technology.
  4. Ray


    We are in the final stages of pushing this out. ASP.Net 2.0 and URL Rewrite 2.0 should be out soon. We'll post it in the forum as soon as we are ready to fully depoly it.

Share This Page