jburford2
Mar 30, 2022Nimbostratus
URL and URI redirect
My F5 has one virtual server for all URL's. I need to set a pool based on one of two matching URL's and a matching URI. the code below is what I am trying, the F5 gives me error everytime I try to update the irule.. it doen not like "else or Elseif"
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
set uri [string tolower [HTTP::uri]]
if { $host contains ".x." } {
if { $uri starts_with "/new" }
{pool "X_NEW"}
}
Else
if { $host contains ".y." } {
if { $uri starts_with "/new" }
{ pool "Y_NEW"}
}
}