Forum Discussion
irule to redirect traffic to specific pool
Hello,
I need to redirect traffic from VS_prospect to a specific node(prospect) if the uri begin whith /NECPF/vod/cpprospect/. VS_prospect is in partition CLI05_SFR and node prospect in partition CLI03_INTE. I create in partition CLI03_INTE a pool that i named pool_prospect whith pool member the node prospect.
My VS have as ressource a default pool named POOL_RP_ADSL to which all traffic is directed. My idea is to add an irule to VS_prospect to direct the traffic to pool_prospect if the uri begin whith /NECPF/vod/cpprospect/. Is it a correct method?
Here is the irule that i create:
when HTTP_REQUEST {
if { [HTTP::uri] contains "^/NECPF/vod/cpprospect/*" } {
pool /CLI03_INTE/pool_prospect
}
}
is the syntax and condition correct? if yes, i will attach this irule to VS_Prospect.Do the traffic be directed to pool_prospect instead of the default pool as expected?
Advice please, it is for production environment!
6 Replies
Almost. Try this one:
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/necpf/vod/cpprospect/" } { pool /CLI03_INTE/pool_prospect } }/Patrik
- Mazen2006_14317
Nimbostratus
Thanks! i will try this...
- Mazen2006_14317
Nimbostratus
How can i add this irule to the VS_prospect using icontrol?
- Which language? And why using icontrol?
- Mazen2006_14317
Nimbostratus
This irule redirect traffic to a media server. We need to activate this on demand by adding or removing the irule from VS_prospect. This procedure will be done by another team(don't having access to the LTM). Is it possible to present an API(java.net) to the team to add or remove the irule whithout giving them access to the LTM? using icontrol or....? I'm afraid you need to give them at least partial admin access.
As for the iControl part, I'm afraid I only know Powershell, but here's the method you'll want to use:
https://devcentral.f5.com/wiki/iControl.LocalLB__VirtualServer__add_rule.ashx
/Patrik
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com