Forum Discussion
Haruto_Hashizum
Nimbostratus
Nov 01, 2017Where does this iRule end?
If client accsess the virtual server that has the iRule below with URI "/aaa/",
which is the endpoint of this iRule A or B?
I'm worried about that this rule excecute "LB::detach" .
when HTTP_REQUE...
Faruk_AYDIN
Altostratus
Nov 01, 2017some curly brackets are missing. The Correct version of the iRule is below. This iRule always executes LB::detach command, after that, does the second switch command where it hits.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"*/aaa/*" {
if { [active_members Pool_aaa] > 0 } {
else {
pool Pool_sorry
}
}
}
"*/bbb/*" {
if { [active_members Pool_bbb] > 0 } {
else {
pool Pool_sorry
}
}
}
}
LB::detach
switch -glob [string tolower [HTTP::uri]] {
"*/ccc/*" {
if { [active_members Pool_ccc] > 0 } {
if { [HTTP::cookie exists "CCC"] } {
persist uie [HTTP::cookie "CCC"]
pool Pool_ccc
}
else {
pool Pool_ccc
}
}
else {
pool Pool_sorry
}
}
default {
if { [active_members Pool_default] > 0 } {
pool Pool_default
}
else {
pool Pool_sorry
}
}
}
}
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
