cancel
Showing results for 
Search instead for 
Did you mean: 

iRules not working

BK1
Cirrus
Cirrus

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.

 

 

1 ACCEPTED SOLUTION

Hello BK,

 

This is may be happening because there're some changes in iRules syntax/behavior for respond and redirect in 14.1 and 15.x version.

 

Below article will help you.

 

https://support.f5.com/csp/article/K23237429

https://cdn.f5.com/product/bugtracker/ID737252.html

 

Hope it helps!

Mayur

View solution in original post

8 REPLIES 8

Hello BK,

 

This is may be happening because there're some changes in iRules syntax/behavior for respond and redirect in 14.1 and 15.x version.

 

Below article will help you.

 

https://support.f5.com/csp/article/K23237429

https://cdn.f5.com/product/bugtracker/ID737252.html

 

Hope it helps!

Mayur

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. 😞

As of now, this is the only solution.

Mayur​

with the workaround given in the article, iRules are working now. I tried multiple iRules. Thank you.​

Sajid
Cirrostratus
Cirrostratus

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]" 

}

}

}

 

👌

BK1
Cirrus
Cirrus

Thanks Sajid, I will try this one also.​

BK1
Cirrus
Cirrus

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

BK1
Cirrus
Cirrus

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

Thank you guys.​