Forum Discussion

BK1's avatar
Icon for Cirrus rankCirrus
Apr 27, 2020

iRules not working



I have set-up one F5 node in lab environment. Everything is working fine except iRules. Some of the iRules are not working, syntax is correct. I tried everything but it is not working. Need ur help. Simple redirect using if statement is not happening. e.g. below one.

F5's is running on 14.1.


if {[HTTP::host] equals "" }

{HTTP:: redirect ""}


Need your help.



8 Replies

    • BK1's avatar
      Icon for Cirrus rankCirrus

      Oh I see! Thanks for letting me know. I was not aware of this change in behaviour. I will try changes suggested in the article. But​ it's seems to be only workaround but not fix. :-(

  • Sajid's avatar
    Icon for Cirrostratus rankCirrostratus

    v14 and v15 use policy


    if you want irule, try this one


    when HTTP_REQUEST {

     switch [HTTP::host] {

    "" {

    HTTP::respond 301 Location "[HTTP::uri]" 






  • Hi Sajid, changes suggested in article shared by Mayur solved my issue.​ Thank you.

  • Finally I was able to run all my iRules on my F5 14.1.

    Thank you guys.​