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

mikey_webb's avatar
Sep 20, 2015

Traffic policy or irule

Need help trying with best solution using either of above as can't get to work. I want to have traffic for 3 different host url to go to a single ltm virtual server where if forwards based on host to other ltm virtual servers this second virtual server in each case has an irule to redirect to https and amend uri which is why I can't simply redirect the initial virtual server to a pool

 

1 Reply

  • Hi,

    Since Local traffic policies exists, I advise new customers to use it instead of irules for multiple reasons:

    • If irules are checking multiple criteria like Host header, Path, Query string, IP address, the irule code will be complex. Any change later will need to read the code again... in Local traffic policies, policy rules are easiest to read.
    • If any need is not available in Local traffic policies (persist cookies name change, ...) it is possible to set tcl variable in policy rule and create a simpler irule to manage this missing feature.
    • Local traffic policies add new features in each version, most of previous irules can be replaced by policies. (ex, in version 12.0 we are able to execute simple tcl code in policies action like :
      HTTP::path replace {tcl [string map {/path/ /} [HTTP::path]]} to remove /path/ from URI sent to server)

    In your question, please use good words...

    • "redirect" is generally used to reply with HTTP Redirect code (301 or 302) and location.
    • we do not redirect to a pool but forward (in policy action, the action is forward pool POOLX)
    • what do you mean by "forward to other virtual server"? on the same F5? on an internal one?