My desired scenario:

  • www.my-example-server.com - This one comes from server 1 (IIS 7.5)
  • www.my-example-server.com/subfolder - This one should come from server 2 (IIS 7.5)

I know how to do this if it were different (sub) domains but not if it are sub folders.

My question:

Is it possible to set up such a configuration with Windows machines and/or some DNS configurations?

Update 1:

Please assume that server 1 and server 2 should have no relation at all, i.e. server 1 could be in another data center than server 2.

My goal is to cut off some high-volume applications (in "subfolder") from our primary domain which host a low-volume application.

Update 2:

Since I have to provide the existing folder structure due to legacy applications POSTing to the server (and redirecting a POST is not possible), I would prefer a solution that is transparent to the end user.

  • If you want client connections to go to the second server without passing through the first one, this can't be done, sorry; DNS only handles server names, not URLs; you can't send some connections to a server and some others to another one if they are subfolders of the same site. – Massimo Oct 17 '11 at 8:51

Might I suggest using subdomains, rather then subfolders if you want to spread the workload to different servers.

Just make A-records for the domain.


A    www
A    app1

This would make www.mydomain.com point to and app1.mydomain.com to

You might need to create a forwarder in IIS (Server Manager > Roles > IIS > HTTP Redirect) to forward traffic coming from old applications.

  • Thanks, @Bart! Subdomains would be my choice, too, if I wouldn't have to support legacy applications. Since they are POSTing to the subfolders, a redirect isn't possible. – Uwe Keim Oct 17 '11 at 8:54
  • 3
    You might need to create a forwarder in IIS (Server Manager > Roles > IIS > HTTP Redirect) to forward traffic coming from old applications. – Bart De Vos Oct 17 '11 at 9:01

Yes, it's possible, and you don't need to act on DNS at all; in IIS, you can have a virtual directory (or a site's home directory) point to a network share.

You simply need to set the directory (or site)'s path to the share's UNC path (\\servername\share) instead of using a local path on the web server.

  • Thanks, @Massimo I think my question is misleading, I'll update for details. – Uwe Keim Oct 17 '11 at 8:42
  • 2
    If you can set up the second server with a different site name, you can use a HTTP REDIRECT in the subfolder of the first site to send clients to the second one. – Massimo Oct 17 '11 at 8:52

Doing this purely in IIS will be cumbersome; of course, it's trivial in Apache.

If you can use a front-end apache proxy to point to both backend servers, this can be solved cheaply and simply; just set up proxying for the Locations you wish to push to either backend.

  • Thank you! Do you think it is achievable for a real-world application that does Ajax, HTTP POST, redirects, rewrites and all this stuff inside IIS to be really transparent when being proxied by an Apache server? I have had bad experiences once, when it comes to details like SSL certificates and the like. – Uwe Keim Oct 17 '11 at 10:02
  • 1
    SSL does add some complexities, but basically, if it was possible without convoluted tricks before proxying, it will work with proxying too. – adaptr Oct 17 '11 at 10:28
  • 1
    Of course if you're going to use a proxy then IIS, Apache or any other server come out even. – John Gardeniers Oct 17 '11 at 20:42
  • IIS has native proxy capabilities now ? – adaptr Oct 18 '11 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.