Forum Discussion
hooleylist
Jan 13, 2009Cirrostratus
If you want to redirect to the host or URI that the client made a request to, you'd need to save the host or URI in HTTP_REQUEST for every request and then reference it in LB_FAILED:
when HTTP_REQUEST {
Save the host header value
set host [HTTP::host]
Save the URI (not sure you want to do anything with the URI though)
set uri [HTTP::uri]
}
when LB_FAILED {
Send 302 redirect with the host header value from the request
HTTP::respond 302 Location "http://$host/sorry/"
}
Aaron