Forum Discussion

Andrea_Arquint's avatar
Andrea_Arquint
Icon for Nimbostratus rankNimbostratus
May 24, 2012

processing sequential redirects within irules

Hi there

 

 

For example I've two irules:

 

 

 

irule_one:

 

--> redirect to www.google.ch

 

 

irule_two:

 

--> redirect to www.switch.ch

 

 

 

What happens with the redirect in irule_two when the first redirect to www.google.ch is processed?

 

 

 

What happens with the TCP session and HTTP session?

 

 

 

 

 

thx

 

bb

 

2 Replies

  • Hi bigbrother,

     

     

    In order to understand better what you are trying to achieve, can you post both iRules please? There are a number of factors here like iRule priority and what conditions are being used to trigger your redirect. If on the other hand you are just testing then try it out! I do this all the time when I have the same kind of questions about iRule behaviour.

     

     

    As for TCP and HTTP session...

     

     

    The redirect is effectively a HTTP response from the F5 and not from the backend server so the HTTP session will be complete. The browser will request a new HTTP session to new destination. The browser will create a new TCP session to the new server to support the new HTTP session.

     

     

    Regards

     

     

    Kevin
  • Hi,

     

    When you apply more than one redirect in the definition of the irule, you may face an error.

     

     

    So, you may want to use the parameter "return" after the initial redirect, so once the TMM reaches the return statement, the system will exit out of the irule.

     

     

    - Santosh.