Forum Discussion
CraigM_17826
Altocumulus
Dec 21, 2009switch command
Hi all,
[Update: fixed the redirect issues so I've removed the examples from the thread. It was just my dyslexic typing]
I'm trying to clean up and optimise some of ...
CraigM_17826
Altocumulus
Dec 21, 2009Hi Bhattman,
thanks for the reply. Actually I rejigged the rule slightly and put in some log statements to see what was going on. It goes somthing like this
switch -glob [string tolower [HTTP::uri]] {
"/sometext" {
log "Using pool1 for URI [HTTP::uri]"
pool pool1
}
"/sometext2" {
log "Using pool2 for URI [HTTP::uri]"
pool pool2
}
}
log local0. "URI: [HTTP::uri]"
What I noticed was that the cases were not matching yet the last log statement was inidcating the specified URI should have matched. For example if I entered http://webserv.com/sometext the switch would not match byt the log statement would indicate the URI was in fact /sometext. The same applied to all the cases in the switch statement, they all failed yet the log statement indicated they should have matched.
Craig
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
