Forum Discussion
Jo_Anglin_5148
Jan 15, 2009Historic F5 Account
uri redirect
I am a newbie to irule and would like some assistance in setting up an irule.
Currently I have a VS with a pool with 5 pool members and I am trying to set up an irule with will allow each clien...
JRahm
Admin
Jan 15, 2009a couple things...
you could consolidate into one class by mapping each uri to the appropriate node:
consolidated_class {
"/nosso/* 66.33.14.10"
"/xRV144991/* 66.33.14.10"
"/5.2_rv950007/* 66.33.14.11"
"/5._RV950048/* 66.33.14.11"
"/dev_5.2/* 66.33.14.11"
}
then your rule is reduced to:
when HTTP_REQUEST {
if { [matchclass [string tolower [HTTP::uri]] contains $::consolidated_class] } {
pool myPool member [findclass [string tolower [HTTP::uri]] $::consolidated_class " "] port myPort
}
}
You'll note that I moved your example away from the node command and instead used the pool command. THis is important if you want the statistics at the pool level. This is untested, I don't have a resource right now, but should get you going.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
