Forum Discussion
Robert_47833
Aug 01, 2012Altostratus
lb::select question
in the irule
if { xxxx} {
pool cjj$env
}
I want to define this $env at the top of this irule,however it should know which pool the traffic is sent,in my c...
dlg_23340
Aug 01, 2012Cirrus
Robbie, what do you mean "it should know which pool the traffic is sent"?
if you want to make sure a pool exists before using it, use 'catch', like this irule:
when HTTP_REQUEST {
set POOL [substr [string tolower [HTTP::host]] 0 ":"]
if { [catch { pool $POOL } ] } {
set POOL default_pool
}
pool $POOL
}
This irule attempts to use a pool that matches the Host header sent by the browser, and if it does not exist sends traffic to default_pool.
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