Forum Discussion
Go to different Pools depending on URL
I have a request to get the following to work:
curl -sSL -D - -o /dev/null should point to CAD_Pool_36 curl -sSL -D - -o /dev/null should point to CAD_Pool_38 anything else should (no A or B in URL) should point to CAD_Pool (default-Pool). Therefore I created an iRule but the choice is every time the CAD_Pool.... nothing else... why does that not work?
when HTTP_REQUEST { log local0. "CAD_My request received" if { [string tolower [HTTP::path]] contains "preview/A" } { log local0. "CAD_My Pool36" pool CAD_Pool_36
}
elseif { [string tolower [HTTP::path]] contains "preview/B" } {
log local0. "CAD_My Pool38"
pool CAD_Pool_38
}
else {
log local0. "CAD_My request DefaultPool"
pool CAD_Pool
}
}
when SERVER_CONNECTED {
log local0. "Connection from [IP::client_addr]:[TCP::client_port] to Server: [IP::server_addr]:[TCP::server_port] established."
}
Any good Tip is highly appreciated...
Best Regards Jerry
- Stanislas_Piro2
Cumulonimbus
conditions
and[string tolower [HTTP::path]] contains "preview/A"
will never match because :[string tolower [HTTP::path]] contains "preview/B"
- [string tolower [HTTP::path]] returns a string in lowercase
- "preview/A" contains an uppercase character
Recent Discussions
Related Content
* 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