Forum Discussion
Leslie_South_55
Nimbostratus
Sep 25, 2007Simple pool selection using URI not so simple...
Greetings once again, I am trying to select a pool based on content in the URI; what I am seeing is the first request selects the pool correctly, but requests that follow are using the default pool. ...
Andy_Herrman_22
Nimbostratus
Sep 26, 2007Here's the code you gave, reformatted a bit:
when HTTP_REQUEST {
if { [HTTP::uri] contains "en_CA" } {
use pool pool_cananda
log local0. "Canada request - canada pool"
}
else {
use pool pool_us
}
log local0. "using default pool"
}
I think it's just your logging that's off. Notice that your "using default pool" log is outside the else statement, so it will display that every time. Try this:
when HTTP_REQUEST {
if { [HTTP::uri] contains "en_CA" } {
use pool pool_cananda
log local0. "Canada request - canada pool"
}
else {
use pool pool_us
log local0. "using default pool"
}
}
and see if it changes.
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
