Forum Discussion
hooleylist
Oct 21, 2008Cirrostratus
Of course... the client never knows about the maintenance URI as it's not being sent a redirect. So the Referer header value still shows the original URI it was making the request from. How about checking for the string "/maintenance_files/" in the requested URI and not rewriting those requests? Is it safe to assume that only the maintenance files will have that in the URI?
when LB_FAILED {
log local0. "[IP::client_addr]:[TCP::client_port]: Request for [HTTP::uri] from Referer '[HTTP::header Referer]' 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::path] contains "/maintenance_files/")}{
log local0. "[IP::client_addr]:[TCP::client_port]: Referer wasn't the maintenance page. Rewriting URI to maintenance page."
HTTP::uri "/maintenance.htm"
}
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