Forum Discussion
hooleylist
Oct 20, 2008Cirrostratus
Can you try this then? I assume HTTP::referer should work in LB_FAILED if HTTP::uri does, but haven't tested this before.
when LB_FAILED {
log local0. "[IP::client_addr]:[TCP::client_port]: Request to pool failed, [LB::server pool]"
Check if this request was not generated from the maintenance page using the HTTP referer header
if {not ([HTTP::header value referer] ends_with "/maintenance_page.html")}{
log local0. "[IP::client_addr]:[TCP::client_port]: Referer wasn't the maintenance page. Rewriting URI to maintenance page."
HTTP::uri "/maintenance_page.html"
}
Send request to the apologies pool
LB::reselect pool pool_apologies_http
log local0. "[IP::client_addr]:[TCP::client_port]: Reselecting member from the apologies pool"
}
Aaron