I'd skip the nested switch evaluation and just trigger the casematters code if the [string tower [HTTP::uri] equals "/casematters". Also, assuming you don't need the client to actually see the different case in the address bar, just change the HTTP::uri on ingress.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/foo*" {
log local0. "foo pool"
pool foo
}
"/bar*" {
log local0. "bar pool"
pool bar
}
"/casematters*" {
log local0. "casematters pool"
pool casematters
set sub_uri [findstr [string tolower [HTTP::uri]] "/casematters" 12]
log local0. "sub_uri = $sub_uri"
HTTP::uri "/CASEmatters$sub_uri"
}
default { pool default }
}
}