Forum Discussion
viziony
Feb 03, 2022Cirrus
iRule Path Routing to pool review.
Hello I have a few designated paths in which I would like to direct to a specific pool otherwise to a default pool. Here is the script that I have came up with using a combination of others I have fo...
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.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects