Forum Discussion
iRule redirection
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
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.
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.
- T_SrinivasCirrus
Samir Jha.. It has worked in single attempt. Thank you very much Samir.
Just FYI : I have utilized the Option 2 i.e iRule
- dennypayneEmployee
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
- T_SrinivasCirrus
Thank you Payne for making us aware of the TCL operators vs iRule operators behavior/performance
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com