Forum Discussion
RACQ_74493
Cirrus
Jan 04, 2011post about how to modify default pool behaviour
Hello,
I found a post on an irule to to send traffic to different pool based on URL and it also discussed how to change the behaviour of the default pool and I cannot find it.
I have an...
RACQ_74493
Cirrus
Jan 07, 2011You could have as many URI:Blocked IP relationships as you wanted inside the class
Yes, however the way I read the class search doco it will hit the first match of the URI and go no further.
So the second or third etc entries for the same URI will never be matched and one would never get ther desired behaviour.
Or have I got it arse about? I mean the thing the class is matching is the URI and returning the IP Address so I don't see why it would continue through the class trying other matches?
I see that one can return all results of the class that match but then one would have to do some funky regex (??) to then match the string and that is way beyond this cowboy's skills.
class search []
Returns 0 or 1 depending on whether an element in matches according to the .
This command form is equivalent to the current iRule command: matchclass .
Example:
class search blocked_paths starts_with [HTTP::uri]
Read as: does blocked_paths contain an element that starts with the uri.
The options for both of the above forms of the class command can be:
-indexChanges the return value to be the index of the matching class element.
-nameChanges the return value to be the name of the matching class element.
-valueChanges the return value to be the value of the matching class element.
-elementChanges the return value to be a list of the name and value of the matching class element.
-allWhen used with the above options, returns a list of all matching elements, not just the first.
--Terminates option processing (useful if the item or '' begins with a hyphen).
The for both of the above forms can be:
equals, starts_with, ends_with, contains
David.
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