Forum Discussion

William_Them_99's avatar
William_Them_99
Icon for Nimbostratus rankNimbostratus
Jan 31, 2006

HTTP_RESPONSE info

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
  • 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
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    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

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules.Commands

     

    Click here

     

     

    -Joe