Also, for what its worth, the
match_regex
is a fairly expensive way to achieve what you want above. This is a more efficient method:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "example.home.com" } {
switch -glob [HTTP::path] {
"/home" -
"/home/*" -
"/home/services" -
"/home/services/*" -
"/home/services/register" -
"/home/services/register/*" -
"/index" -
"/index/*" -
"/default" -
"/default/*" {
pool myPool
ASM::enable MyPoolASM
}
}
}
}
It's probably also worth mentioning that /home/services(/.*) and /home/services/register(/.*) are covered by the /home(.*) branch. Also, your regexps end with the literal ?, but that is not part of
HTTP::path
, so that will never match.