2021-12-12 14:52 (Last updated: 2023-04-17 20:15)
Redirect to a different URI in F5
Sometimes we need requests to a certain URI to be redirected to a different one, i.e., a request to https://www.ejemplo.com, may need to end at https://www.ejemplo.com/login. For this we have the iRules.
Configure iRule
Local Traffic->iRules->iRule List

Name=nombreDefinition=
when HTTP_REQUEST {
if { [HTTP::uri] equals "/"}
 {
    HTTP::redirect "https://[HTTP::host]/login"
 }
}

Apply the iRule
Local Traffic->Virtual Servers->Virtual Server List

- Select VIP
 

Resources->Manage iRules

- Select the iRule from the available list and add it to the enabled list.
 
