Forum Discussion
IheartF5_45022
Apr 03, 2014Nacreous
I think you can just use normal cookie persistence profile on the virtual without using an iRule for it, however you will need to use another cookie to say "use test pool". Try this;-
when HTTP_REQUEST {
set fAddCk 0
if {[HTTP::cookie exists "X-testpool"]} {
pool pl_test_http
} elseif { [string tolower [HTTP::uri]] contains "testsite" } {
pool pl_test_http
Set flag to insert cookie if it doesn't already exist
set fAddCk 1
}
}
when HTTP_RESPONSE {
if {$fAddCk} {
HTTP::cookie insert name "X-testpool" value "blah"
}
}