Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

VIP redirection

Hi,

We have two pool members.

If user trying is accessible the url#www.ABC.com traffic should go to both pool members,but if user trying to access the url#www.ABC.com/xyz traffic should go to the one pool member.

Pls. Let me how we can do it ?

Do we need any irule for the same ??

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

This can be done via iRule or Policy (if you are running v11.4+). Personally, I would go with the policy, as it's easier to interpret for those newer to the F5 platform.

The below examples assumes your pool is named my_pool and you have a member defined with IP address 1.2.3.4 and port 80.

iRule

when HTTP_REQUEST {
    if { [HTTP::path] starts_with "/xyz" } {
        pool my_pool member 1.2.3.4 80
    }
}

Policy

ltm policy single_member_xyz {
    controls { forwarding }
    requires { http }
    rules {
        xyz {
            actions {
                0 {
                    forward
                    select
                    member 1.2.3.4:80
                }
            }
            conditions {
                0 {
                    http-uri
                    path
                    starts-with
                    values { /xyz }
                }
            }
            ordinal 1
        }
    }
    strategy first-match
}
0
Comments on this Answer
Comment made 29-Jan-2016 by Anuj Chaudhary 355
thanks we have 10.6 version...
0
Comment made 29-Jan-2016 by Anuj Chaudhary 355
we have https url then there will be https in above irule and policy..
0
Comment made 29-Jan-2016 by Theo 380
It makes no difference whether it's http or https, but this does require the http profile (which means SSL offloading for your https VIP).
0
Comment made 01-Feb-2016 by Anuj Chaudhary 355
thank you.......
0
Comment made 11-Feb-2016 by Anuj Chaudhary 355
Can we add more text in above irule ? https://uatservices.goindigo.in/PassengerManifest https://uatservices.goindigo.in/RevenueExtraction/ https://uatservices.goindigo.in/IflyTraining/ https://uatservices.goindigo.in/AgentPortal/ https://uatservices.goindigo.in/AmountReconcilation/ https://uatservices.goindigo.in/AuditPortal/pages/frmLogin.aspx https://uatservices.goindigo.in/HR-Exams/ https://uatservices.goindigo.in/IndigoCreditAccount/ https://uatservices.goindigo.in/LegalTracker/ https://uatservices.goindigo.in/FinApp/ https://uatservices.goindigo.in/WelcomeSMS/
0
Comment made 22-Feb-2016 by MOHIT 398
Yes, Anuj you can add more URIs, for the same you need use switch global
0