Forum Discussion
Craig_Hammer_10
Nimbostratus
Jul 21, 2005Failing to match URI in SWITCH statment
When using this rule, I never seem to match the first two evaluation steps:
when HTTP_REQUEST {
switch { [HTTP::uri] starts_with } {
"/argo/tcc" {
use pool one
}
"/ar...
unRuleY_95363
Jul 21, 2005Historic F5 Account
I don't believe you want the "starts_with" operator as part of the switch. You probably want something more like this:
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/argo/tcc*" {
use pool one
}
"/argo/tc-update*" {
use pool two
}
default {
use pool three
}
}
}Notice I added -glob to the switch command to enable glob matching and then added an '*' after the strings.
For more information on the switch command Click here:http://tmml.sourceforge.net/doc/tcl/switch.html
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
