Domai_23823
Sep 13, 2018Nimbostratus
error: [undefined procedure: default][default { discard }]
Hello Guys, I have the below iRule and when I try to apply it I get the error - "error: [undefined procedure: default][default { discard }]"
When the users type in "https://topgear.com/current/cars/models" I want the traffic to hit the toyota_pool but if the users don't type anything in the uri and type "https://topgear.com" I just am looking to redirect it to "https://cars.com"
What am I missing here? - Thank you
when HTTP_REQUEST
{
set host [HTTP::host]
set hostLowered [string tolower $host]
set uri [HTTP::uri]
set uriLowered [string tolower $uri]
switch -glob $hostLowered
{
"topgear.*" {
if { $uriLowered contains "car" } then {
SSL::disable serverside
pool toyota_pool
} else {
if { $uriLowered equals "/" }
{ HTTP::respond 301 Location "https://cars.com" }
}
default { discard }
}
}
}