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

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

iRules not working

Hi,

 

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 "abc.com" }

{HTTP:: redirect "par.com"}

 

Need your help.

 

 

8 Replies

    • BK1's avatar
      BK1
      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
    Sajid
    Icon for Cirrostratus rankCirrostratus

    v14 and v15 use policy

     

    if you want irule, try this one

     

    when HTTP_REQUEST {

     switch [HTTP::host] {

    "abc.com" {

    HTTP::respond 301 Location "https://par.com[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.​