F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

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] }

}