Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

iRule redirection

T_Srinivas
Cirrus
Cirrus

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

1 ACCEPTED SOLUTION

Samir
MVP
MVP

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.

 

 

View solution in original post

4 REPLIES 4

Samir
MVP
MVP

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.

 

 

Samir Jha.. It has worked in single attempt. Thank you very much Samir.

 

Just FYI : I have utilized the Option 2 i.e iRule

Denny_Payne
F5 Employee
F5 Employee

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_Srinivas
Cirrus
Cirrus

Thank you Payne for making us aware of the TCL operators vs iRule operators behavior/performance