OK, so, you may want to always specify the fqdn as lowercase and also lower what your matching against:
if { [string tolower [HTTP::host]] equals $fqdn }
I'd also reorder your logic as it's possible you'll mark the newly selected node as down:
when HTTP_RESPONSE {
if { ([HTTP::status] == 500) or ([HTTP::status] == 404) or ([HTTP::status] == 503) } {
if { [active_members $poolname] > $NbNode } {
LB::down
LB::reselect pool $poolname
}
else {
LB::reselect pool $poolname
}
}
}
I'm pretty sure you could shorten the HTTP::status lookup too but I'm too tired to try.
Also not you don't have any spaces between your if's and the opening brace {.