Forum Discussion
Brian_Kenworthy
Nimbostratus
Jul 31, 2009Rule Modification Help with Switch
Hi all, I have the following existing rule that we will be adding another pool to. I am using the switch command, but am wondering if I need to add some if/else clauses. Here's the existing rule: ...
Aug 03, 2009
The only thing I can see is that you are doing a "string tolower" on your URI but comparing it to "/BPro*" which is not lower case. That was my bad for not noticing that in the previous post. First thing I would do would be to replace "/BPro*" with "/bpro*". If that doesn't work, you'll need to do some logging to look at the inbound URI's and then where they are getting matched. This can be done with something like this:
when HTTP_REQUEST {
log local0. "Request for URI [string tolower [HTTP::uri]]"
switch -glob [string tolower [HTTP::uri]] {
"/clientmismo/order.asp*" -
"/vendormismo2/status.asp*" -
"/vmsxml/order.asp*" -
"/vmsxml/status.asp*" -
"/_xmlbeta/ors/status_mismo21.asp*" -
"/_xmlbeta/ors/status.asp*" -
"/_xmlbeta/ors/rels_status_mismo21.asp*" -
"/vendornla/status.asp*" {
log local0. "Matched first case"
pool beta3.res-direct.com_B2B_HTTPS
}
"/bpro*" {
log local0. "Matched /bpro*"
pool beta3.res-direct.com_BatchPro_HTTPS
}
default {
log local0. "Match not found, defaulting to beta3.res-direct.com_GUI_HTTPS pool"
pool beta3.res-direct.com_GUI_HTTPS
}
}
}
Run a request through this and look in your /var/log/ltm logfile on your BIG-IP to see where it's going wrong.
Hope this helps...
-Joe
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