Forum Discussion
vlavergne_12825
Aug 01, 2005Historic F5 Account
You are right but I hadn't any BIG-IP in front of me to verify !! That will be nice to have such an interface on devcentral to verify the rule syntax... However here is the final rule
when HTTP_REQUEST {
if { [HTTP::cookie exists "PHPSESSID"] } {
set pl [persist lookup uie [HTTP::cookie "PHPSESSID"] ]
if { $pl ne "" } {
pool front member [lindex $pl 1] [lindex $pl 2]
} else {
log local.0 "Session ID [HTTP::cookie "PHPSESSID"] expired on the server for client [IP::client_addr]"
pool front
}
}
}
when LB_FAILED {
pool front
log local.0 "LB Failed for client [IP::client_addr]"
LB::reselect
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists "PHPSESSID"] } {
set pl2 [persist lookup uie [HTTP::cookie "PHPSESSID"] ]
if { $pl2 ne ""} {
log local.0 "Existing Cookie PHPSESSID $pl2 generated by [IP::server_addr] and within persistance table
[lindex $pl2 1] [lindex $pl2 2] for client [IP::client_addr]"
}
persist add uie [HTTP::cookie "PHPSESSID"]
}
}
Thanks for your help