Forum Discussion
Daniel_Wolf
MVP
Hi viziony,
I think you could use a switch statement rather than a lot of or conditions. This iRule should work for you.
Instead of starts_with, I use a wildcard *. You could also use HTTP::path instead of HTTP::uri.
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::uri]] {
"/a.php*" -
"/b.php*" -
"/c.php*" {
pool my_pool_ABC
}
default {
pool my_pool_XYZ
}
}
}
Let me know if this one works for you, or it needs adjustments.
KR
Daniel
viziony
Feb 03, 2022Cirrus
Thank you Dan for the quick reply! Will update this thread once I test it out.