Forum Discussion
qliang_231469
Nimbostratus
Sep 10, 2018Get URI and Direct to the pool with part of the URI number
Hi Pros,
I have a questions, I have a irule
like this
set uri_info [string tolower [HTTP::uri]]
switch -glob $uri_info {
"/sj-01/"
{pool marketing-lead-01 }
"/sj-02/"
{pool marketing...
Stanislas_Piro2
Cumulonimbus
Sep 11, 2018you can get the ID with scan command
when HTTP_REQUEST {
If the variable uri doesn't match the pattern or pool doesn't exist.
if {![scan [HTTP::uri] {/sj-%[^/]} ID] || [ catch {pool "marketing-lead-${ID}"}]} {
pool marketing-lead-default-pool
}
}
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