Forum Discussion
CraigM_17826
Altocumulus
Dec 02, 2009Very odd behaviour when URI contains a - or _ in a string you are checking for
Hi everyone,
I think I have come across an odd issue with using string compares for selecting pools. I am checking for a specfic piece of text in a URL and if it is found it will use a ...
The_Bhattman
Nimbostratus
Dec 02, 2009Hi Craig,
I don't believe you need to use quotes when defining you pool
I.E.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/exam-services" } {
if { [active_members ExamServices] > 0 } {
pool ExamServices
} else {
pool ExamServices_Error
}
}
}
Assuming that ExamServices and ExamServices_Error is your pool names
Also I don't think need to add a return 0 to execute out of the event since it's going to do that with your IF-ELSE statement intrinsically
Bhattman
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
