27-Apr-2020 11:59
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.
Solved! Go to Solution.
27-Apr-2020 12:03
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
27-Apr-2020 12:03
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
27-Apr-2020 21:50
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. 😞
27-Apr-2020 22:59
As of now, this is the only solution.
Mayur
28-Apr-2020 04:58
with the workaround given in the article, iRules are working now. I tried multiple iRules. Thank you.
27-Apr-2020 13:03
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]"
}
}
}
👌
27-Apr-2020 21:50
Thanks Sajid, I will try this one also.
30-Apr-2020 04:12
Hi Sajid, changes suggested in article shared by Mayur solved my issue. Thank you.
04-May-2020 04:13
Finally I was able to run all my iRules on my F5 14.1.
Thank you guys.