05-Aug-2020 07:49
HI , Any one please guide me here
I have below irule,
When HTTP request coming with not matching host name "test.new.com" , it is taking elseif statement by adding www, host uri, not going to else statement, last one
But the statement elseif is only for starts_with, www request. like www.123.com.
example:
When http request coming with host name " flow.com"
I am seeing URL changing in browser www.flow.com
it is taking elseif condition !
any correction?
Solved! Go to Solution.
06-Aug-2020
01:09
- last edited on
24-Mar-2022
01:12
by
li-migration
As your elseif statement is elseif { ! ([HTTP::host] starts_with "www.") },
So when request is coming for host flow.com, it is not equal (!) to condition starts_with "www" so it is matching elseif statement and redirecting it as per action statement - HTTP::redirect https://www.[HTTP::host][HTTP::uri]}
Can you please elaborate your overall requirement to help further?
Mayur
06-Aug-2020
01:09
- last edited on
24-Mar-2022
01:12
by
li-migration
As your elseif statement is elseif { ! ([HTTP::host] starts_with "www.") },
So when request is coming for host flow.com, it is not equal (!) to condition starts_with "www" so it is matching elseif statement and redirecting it as per action statement - HTTP::redirect https://www.[HTTP::host][HTTP::uri]}
Can you please elaborate your overall requirement to help further?
Mayur
06-Aug-2020 02:15
Thanks Mayur, I understood, it is very clear. I missed it elseif { ! .
I am new to irule, so missed it.