Forum Discussion

SSHSSH_97332's avatar
SSHSSH_97332
Icon for Nimbostratus rankNimbostratus
Apr 12, 2013

Irule to Change on Response but for certain Requested URL

How to do that

 

i want to change ih HTTP response ( which can be done matching HTTP-RESPONSE event ... but how to do that for certain Specific requested URL ?

 

how will F5 know which URL was requested if IRULE is matching RESPONSE ?

 

 

5 Replies

  • You're busy! =] You'll need to set a variable in the HTTP_REQUEST event and then check it's value in the HTTP_RESPONSE event.
  • will setting that Variuable be from F5 Irule or what ?

     

    is there an example ?

     

     

  • Here you go;

    
    when HTTP_REQUEST {
     set specialurl 0
     if { [HTTP::uri] equals "/test.txt" } {
      set specialurl 1
      }
     ...any other rule elements...
    }
    when HTTP_RESPONSE {
     if { $specialurl = 1 } {
      do something }
     else {
      do something else or nothing }
    }
    
  • But what is the match between the request & the response

     

    which means , How will the Irule know that this response is of This request ?