Forum Discussion
abeny_894
Nimbostratus
Dec 12, 2008HTTP::uri problem
Deal all,
I have got some problems on [HTTP::uri], for example:
_________________________________________________________
http://www.foo.com/development/ --> Pool 1
...
hoolio
Cirrostratus
Dec 12, 2008A switch statement might be easier to manage than a chain of if/elseif/else statements. You can add logging to see what's happening:
when HTTP_REQUEST {
Check the requested URI
switch -glob [HTTP::uri] {
"/development*" {
log local0. "[IP::client_addr]:[TCP::local_port]: [HTTP::uri] matched /development"
pool pool_development
}
"/marketing*" {
log local0. "[IP::client_addr]:[TCP::local_port]: [HTTP::uri] matched /marketing"
pool pool_marketing
}
"/support*" {
log local0. "[IP::client_addr]:[TCP::local_port]: [HTTP::uri] matched /support"
pool pool_support
}
default {
log local0. "[IP::client_addr]:[TCP::local_port]: [HTTP::uri] hit default case"
reject
}
}
}
If this doesn't work as expected, can you check the /var/log/ltm log file and post the log output?
Aaron
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
