Forum Discussion
hooleylist
Jun 02, 2010Cirrostratus
Hi Jamshid,
Sure.. there's an example on the HTTP::retry wiki page you could adapt:
http://devcentral.f5.com/wiki/default.aspx/iRules/http__retry
One can save a WAN round trip by following a redirect at the LTM and responding to the
original client request with the result of the redirect
when HTTP_REQUEST {
Save the host header value
set host [HTTP::host]
}
when HTTP_RESPONSE {
Check if response is a redirect based on the status code
if { [HTTP::is_redirect] } {
Now generate a GET request to the new location
HTTP::retry "GET [HTTP::header location] HTTP/1.1\r\nHost: $host\r\n\r\n"
}
}
Aaron