For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

VFB's avatar
VFB
Icon for Cirrus rankCirrus
Apr 20, 2021
Solved

Redirect rewrite iRule

I'm trying to craft an irule to do the following: If user hits site-1 and has /europe/[HTTP::uri], redirect him to site-2, remove /europe and add /america, and append trailing URI of the initial request.

 

when HTTP_REQUEST {

if {[HTTP::host] == www.site-1.com && [HTTP::uri] == "/europe/[HTTP::uri]" } {

HTTP::redirect "www.site-2.com/america/[HTTP::uri] }

}