Forum Discussion
Brian_Gupta_115
Nimbostratus
Jan 27, 2005Need a sanity check on a URI parsing rule...
when HTTP_REQUEST {
set my_uri [string tolower [HTTP::uri]]
if { $my_uri contains "/hr" or $my_uri starts_with "hr" } {
pool hrmstest
} ...
unRuleY_95363
Feb 01, 2005Historic F5 Account
You may also use multiple classes to partition your pool matching.
Eg, create several classes (aka "data groups" or "value lists").
class hrmstest_uris {
"/hrtest"
"/hr"
"/psp/HR"
}
class crtest_uris {
"/cr"
}
Then in your rule have:
when HTTP_REQUEST {
if { [matchclass [HTTP::uri] starts_with $::hrmstest_uris] } {
pool hrmstest
}
elseif { [matchclass [HTTP::uri] starts_with $::crtest_uris] } {
pool crtest
}
else {
pool fintest
}
}
You could also use a combination of matchclass tests with standard contains/starts_with tests.
Also, the matchclass commmand can be used with the operators equals, contains, starts_with and ends_with.
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
