Without resorting to regular expression matching (which should be avoided), I believe there is no way to do the kind of negation that you are describing with a
switch
. This leaves you with two options:
switch [HTTP::uri] {
"/bar/*" { pool blah }
default {
if { !([HTTP::uri] starts_with "/foo/") } {
pool blah
}
else {
pool default
}
}
}
or
if { [HTTP::uri] starts_with "/bar/" || !([HTTP::uri] starts_with "/foo/") } { pool blah }
then just set the VS default pool to "default". Unhappily, in this, you can't avoid the double-evaluation in the worst case.