1

I asked this question before and I already know how to use ISA Server 2006 to implement this function, my current question is how to implement the same function without using ISA Server but using pure IIS only. Does anyone have any ideas?

My development/deployment environment is, IIS + Windows Server 2003/2008 + .Net + VSTS2008 + C#. I have several web sites, each of them has stable and beta version, for example, I have beta version order system and stable version order system, the same as purchase system. I deployed the 4 systems on 4 different physical machines (machine name labvm1, labvm2, labvm3 and labvm4).

My requirement is, I want to have a common URL schema to access the different systems, like,

http://www.mycorp.com/order/beta
http://www.mycorp.com/order/stable
http://www.mycorp.com/purchase/beta
http://www.mycorp.com/purchase/stable

But since the 4 systems are deployed on 4 different physical machines with different machine/DNS name, how could I map the same domain (http://www.mycorp.com) with different suffix to different physical online systems?

thanks in advance, George

6 Answers 6

2

I think this can be done with Load Balancing, but it looks like kind of a pain to implement.

Theoretically you could write an ISAPI request forwarder as well, or buy one like ISAPIReWrite.

I would recommend just doing IIS redirections so the user can enter the pretty url to get there, but then they get redirected to the appropriate machine. Or frames, I guess, is another option.

8
  • Thanks AdamB, 1. I need to setup 4 sites (mycorp.com/order/beta, mycorp.com/order/stable, mycorp.com/purchase/beta and mycorp.com/purchase/stable), and then setup them redirect to labvm1, labvm2, labvm3 and labvm4 individually? No way to implement a single web site and redirect traffic based on URL path? 2. Any pros and cons compared of using ISA Server 2006 and IIS redirection?
    – George2
    Jul 14, 2009 at 4:22
  • 1
    1. Yes, you set them up individually. There isn't a way in IIS to redirect it based on URL path (without an ISAPI filter) 2. ISA Server should let you do this with its "Publish Intranet sites" feature. I don't see any downside to doing that if you have ISA, but I personally don't have experience with doing that.
    – Adam Brand
    Jul 14, 2009 at 4:26
  • Thanks AdamB, what do you mean "Or frames, I guess, is another option", could you explian more please? :-)
    – George2
    Jul 14, 2009 at 4:29
  • 2
    George another option is ISAPIReWrite ($99): isapirewrite.com. Just updated my answer with that. As for frames, I mean HTML frames like: <FRAMESET> <FRAME src="somewhereelse.com"> </FRAMESET>
    – Adam Brand
    Jul 14, 2009 at 4:37
  • 1
    As for mapping that other path, create a new subsite in IIS and go to properties to create a redirection for it.
    – Adam Brand
    Jul 14, 2009 at 4:42
1

Depends on your requirement...

If you're satisfied with one instance of IIS executing your code and serving up the pages, use virtual folders. Otherwise you have to use a URL rewriter like ISAPIRewrite.

1
  • Hi Dan, I find another issue when using IIS built-in redirection feature, the destination URL in IE browser becomes the internal machine name (e.g. labvm1), any ideas to change it to display external web site (www.mycorp.com) name? The purpose why I want to have such kind of redirection is I need to hide the internal machine name.
    – George2
    Jul 14, 2009 at 10:50
1

Ionic Rewrite is a free URL rewriter that works well... I have used it for many Drupal sites that I've run on IIS...

1

I would have one of the 4 servers host the www.mycorp.com site, and just use a folder structure with simple html redirects to each of the 4 servers.

In detail: One of your 4 servers handle the www.mycorp.com web site - this can be setup with a secondary web site in IIS that maps to a separate IP address from you server's main IP.

Now, in this mycorp site, create one folder for each of the 4 sites you need (order-beta, order-stable, purchase-beta,purchase-stable). In each of these folders you place an index.html file with a meta refresh tag that redirects the user to the corresponding server:

http://server1">

This would give you a single "starting point" for your folder structure while stile being able to host these apps on different servers. And its easy and cheap.

1
  • "a folder structure with simple html redirects to each of the 4 servers." -- interested, could you talk more details please?
    – George2
    Jul 14, 2009 at 9:39
1

Ionic's ISAPI Rewrite (IIRF) is a good URL rewriter for IIS (and free), but it sounds like the OP wants an HTTP Proxy. IIRF can do either rewriting or HTTP reverse proxy. You need version 2.0 of IIRF to get the proxy capability.

0

This sounds like a job for URL Rewriting... Windows 2008 has a pre-packaged module and it's pretty easy/powerful... Windows 2003 benefits from a multitude of URL Rewriting choices such as URLRewriter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .