Forum Discussion
TLBrown_220661
Nimbostratus
11 years agoNeed help with pool selection based on URI
This rule doesn't show any syntax errors in the editor, but I am not getting traffic to the pools. The rule resides in the Common partition and points to the pools using a path structure:
when H...
Stanislas_Piro2
Cumulonimbus
11 years agoHi,
[HTTP::uri] does not contains hostname, [HTTP::host] is the right variable in the switch command.
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"accountsearchdev.somewhere.com" { pool "/test-partition/accountsearchdev.somewhere.com-1080" }
"maintenancedev.somewhere.com" { pool "/test-partition/maintenancedev.somewhere.com-1081" }
"passportnetdev.somewhere.com" { pool "/test-partition/passportnetdev.somewhere.com-1082" log "Matched to passportnetdev.somewhere.com-1082"}
default { log "Request: [HTTP::host] from [IP::client_addr] failed - no match in list" }
}
}
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