« Previous Next »

Thread: how to implmenent such URL rewrite rule in ARR?

Last post 07-21-2009 8:04 AM by George2. 7 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (8 items)

Sort Posts:

  • 07-14-2009, 11:55 PM

    • George2
    • Top 75 Contributor
    • Joined on 09-03-2008, 12:48 PM
    • Posts 106

    how to implmenent such URL rewrite rule in ARR?

    Hello everyone,

    My development/deployment environment is, IIS 7.0 + Windows Server 2008. 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? I want end user from browser to see URL like www.mycorp.com, not internal machine name like labvm1.

    BTW: I do not need pilot or A/B testing function from ARR, URL rewrite is good enough. :-)

    thanks in advance,
    George

  • 07-17-2009, 1:10 AM In reply to

    • wonyoo
    • Top 50 Contributor
    • Joined on 12-15-2007, 6:46 PM
    • Posts 125

    Re: how to implmenent such URL rewrite rule in ARR?

    In your case, because the 4 sites are running on different machines, you have to proxy that request via common gateway (like ARR).  So I don't think you will be able to accomplish what you want with just URL rewrite.

    I think this article will explain how you can achieve what you want to do.

    http://learn.iis.net/page.aspx/659/reverse-proxy-with-url-rewrite-v2-and-application-request-routing/

     

  • 07-19-2009, 4:10 AM In reply to

    • George2
    • Top 75 Contributor
    • Joined on 09-03-2008, 12:48 PM
    • Posts 106

    Re: how to implmenent such URL rewrite rule in ARR?

    Thanks wonyoo, your reply is very helpful. I read this document carefully and one confusion, in the sample mentoned in the document, I need to implement ARR from  http://localhost/webmail/default.aspx to http://localhost:8081, if in my localhost there is already a web site which occupies port 80, do I need to remove it in order to make ARR to work?

  • 07-19-2009, 5:33 AM In reply to

    • wonyoo
    • Top 50 Contributor
    • Joined on 12-15-2007, 6:46 PM
    • Posts 125

    Re: how to implmenent such URL rewrite rule in ARR?

    No, you don't need to move it.  ARR is a "server" level feature, meaning it is available for all sites to use.  Therefore, if you already have a site running on port 80, you will want to add an additional rule in URL rewrite conditions (using SERVER_PORT) so that the URL rewrite rule is apply only for the site that you want to use to proxy request to http://localhost:8081.

    (ie. if you want to receive origin request on 8080 and route it to 8081, make sure that you apply the URL rewrite rule for the proxy only for 8080 using SERVER_PORT in the URL rewrite condition)

  • 07-19-2009, 6:20 AM In reply to

    • George2
    • Top 75 Contributor
    • Joined on 09-03-2008, 12:48 PM
    • Posts 106

    Re: how to implmenent such URL rewrite rule in ARR?

    Thanks wonyoo, actually I am confused about why do you mean ARR is a server level feature. I think it should be web site level feature, because of two points,

    1. here is my IIS management console screen snapshot, and you can see we configure URL Rewrite under a specific web site (in my sample Default Web Site);

    http://i29.tinypic.com/f9i5qp.jpg

    2. the web.config which rewrite rule impact is also applied to web site level, in my sample, web.config under c:\interput\wwwroot is modified to contain new rewrite rule.

    Appreciate if you could clarify. Thanks.

  • 07-19-2009, 7:14 AM In reply to

    • George2
    • Top 75 Contributor
    • Joined on 09-03-2008, 12:48 PM
    • Posts 106

    Re: how to implmenent such URL rewrite rule in ARR?

    Hi wonyoo, I have another https related question, appreciate if you could help. :-)

    http://forums.iis.net/p/1159372/1910769.aspx#1910769

  • 07-20-2009, 12:40 PM In reply to

    • wonyoo
    • Top 50 Contributor
    • Joined on 12-15-2007, 6:46 PM
    • Posts 125

    Re: how to implmenent such URL rewrite rule in ARR?

    George

    Yes, the URL rewrite rules can be set at the site level, but ARR is scoped to the server.  Note that when you click on the server, there are both URL rewrite icon as well as the ARR icon (but you won't see ARR icon at the site level).

    Typically, for the ARR scenarios, we write the URL rewrite rules at the server level as well (the difference is that the rules are written to "globalRules" and they are applies to all sites.)

    Regardless of whether you are writing the rules at the server level or at the site level, ARR's scope is the server, but for what you are doing, it may not matter, esp. if you only have one default website.

  • 07-21-2009, 8:04 AM In reply to

    • George2
    • Top 75 Contributor
    • Joined on 09-03-2008, 12:48 PM
    • Posts 106

    Re: how to implmenent such URL rewrite rule in ARR?

    Thanks wonyoo, I like the tricks mentioned in the document. :-)

    I met with a new issue here dealing with Http Response Location header, appreciate if you could take a look. :-)

    http://forums.iis.net/p/1159414/1910970.aspx#1910970

Page 1 of 1 (8 items)
Microsoft Communities