Is there a way, within the HTTP_RESPONSE realm, to output to the log the destination to which the BIGIP is about to route the user?
Thanks.
-Bill
Is there a way, within the HTTP_RESPONSE realm, to output to the log the destination to which the BIGIP is about to route the user?
Thanks.
-Bill
Sure you can. You can use the IP::server_addr command.
when HTTP_RESPONSE {
log local0. "server address: [IP::server_addr]"
}
By the way, if you haven’t see it yet, check out the new iRules wiki we have setup. It has all the available commmands listed there.
-Joe
Thanks Joe, the wiki is helpful.
As a follow-up, do you know of any DevCentral posts or do you have any experience in iRules with handling the “double request” that Internet Explorer seems to make? It’s too involved to explain our whole situation here, but this seems to be the culprit…When requests are made with IE, things seem to happen twice (log entries, activities), and then eventually break with “Page cannot be displayed” but the same tests do not break with Firefox.
This double request stuff was even mentioned to us when an F5 technical sales rep was here a while ago to show us how to work the devices…
Thanks for any help.
-Bill
I personally don’t know anything about this issue. Does anyone else?
-Joe
BTW, HTTP_RESPONSE is triggered after the request has been routed to a back-end server and it has responded. If you want to “log the destination to which the BIGIP is about to route the user”, you should do that in the LB_SELECTED event.
Cool - thanks.
Joe mentioned the IP::server_addr variable to get the destination server, but is there a way to output the URL the user is about to go to? We want to see if our rule is redirecting to the appropriate web page.
-Bill
I think this is what you are looking for:
when HTTP_REQUEST {
log "URL is [HTTP::host][HTTP::uri]"
}
For a list of all available commands, check out the Commands topic in the iRules wiki
-Joe