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

iRules

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

iRule

Apply the iRule

  • Local Traffic -> Virtual Servers -> Virtual Server List

VIPs

  • Select VIP

VIP

  • Resources -> Manage iRules

Resources

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

iRule