23-Mar-2020 19:36
Hello Team, I need your help. Can you help me with iRule for following redirection
https://xyz.com to https://xyz.com/D2
I have tried few url redirection, but it didn't work
Solved! Go to Solution.
24-Mar-2020 07:33
Suggest you to go via F5 policy for such redirection, Its very easy : https://devcentral.f5.com/s/articles/inside-the-big-ip-simple-url-redirects-32269
Option 2: Find the below irule and apply to VIP.
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect "https://xyz.com/D2"
}
}
Let us know if any issue.
24-Mar-2020 07:33
Suggest you to go via F5 policy for such redirection, Its very easy : https://devcentral.f5.com/s/articles/inside-the-big-ip-simple-url-redirects-32269
Option 2: Find the below irule and apply to VIP.
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect "https://xyz.com/D2"
}
}
Let us know if any issue.
25-Mar-2020 03:57
Samir Jha.. It has worked in single attempt. Thank you very much Samir.
Just FYI : I have utilized the Option 2 i.e iRule
25-Mar-2020 08:04
Just to note: the native TCL string comparison operator is 'eq' - 'equals' works because it is an iRule extension, but performance will be better with the native operator. This likely won't matter too much in this case since it's a simple redirect, but something to keep in mind.
See Jason Rahm's article for more detail: https://devcentral.f5.com/s/articles/choose-your-operator-wisely-32909
14-Jun-2020 22:53
Thank you Payne for making us aware of the TCL operators vs iRule operators behavior/performance