For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

WUM_113639's avatar
WUM_113639
Icon for Nimbostratus rankNimbostratus
Jan 11, 2015

Server and URI Redirection using iRule

Hi Experts,

We are creating an irule for reporting section of a website, we have main site working fine but the reporting is having issue via iRule...

Main Site....

server url - https://customer.com/wrenchentservice/wrenchentservice.asmx Report url - https://customer.com/Report/Basic.aspx

The Server url is working fine, bu the report url is not, we have configured following irule.

when HTTP_REQUEST {

if { ( [string tolower [HTTP::host]] eq "wrench.enoc.com" ) and ( [string tolower [HTTP::uri]] starts_with "/Report/" ) } {

pool WRENCH_POOL

}

if { [string tolower [HTTP::host]] equals "wrench.enoc.com" } {

pool WRENCH_POOL

}

}

6 Replies

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    First observation, you've got string tolower but Report has a capital R. Change this to /report.

     

    Does that help?

     

  • Actually, I need to put all in caps, so I have removed string to lower and written /REPORT/ in the irule URI.

     

    But the results are same, the server url is working but report url is not working

     

    • nathe's avatar
      nathe
      Icon for Cirrocumulus rankCirrocumulus
      Ok. Bit confused though. Cos if the report uri misses the first if statement then it will hit the second, due to the host name, and go to the same pool
  • Yes, I have tried "/" with only one if condition, even then, only server url is working only.

     

    Is there anyway, on LTM, we can see, what the pool member is sending in HTTP response to the customer request? without doing anything on the server. using TCPDUMP?

     

    • nathe's avatar
      nathe
      Icon for Cirrocumulus rankCirrocumulus
      You can use the "LB::server addr" in the LB_SELECTED event to log this
  • Snl's avatar
    Snl
    Icon for Cirrostratus rankCirrostratus

    hello Experts both URL working fine in the server it self but when we try from F5 vip with Irule its not working Actual server url is https://customer.abc.com/Report/Basic.aspx server responding as -https://customer.abc.com/REPORT/Basic.aspx?

     

    below is the irule tried when HTTP_REQUEST { if { ( [string tolower [HTTP::host]] equals "customer.abc.com" ) } { pool ABC_POOL }

     

    is anything to do with uri /Report to /REPORT response from server when goes to client

     

    please help