Forum Discussion
adrianglendinning
May 21, 2024Nimbostratus
redirect irule
Hi, We are moving off A10s to F5s and we have an old a10 aflex rule which redirects certain traffic to a particular pool. when HTTP_REQUEST { if { [HTTP::uri] contains "<xyz>"} { pool test-...
tiziano_rosato
May 21, 2024Cirrus
Hope below example can help you:
if you match "aol" traffic is sent to aol_pool otherwise is sent to the default pool associated to the VS.
when HTTP_REQUEST {
# case sensitive
if { [HTTP::uri] contains "aol" } {
pool aol_pool
}
}
In below cases we can the default pool in the code.
when HTTP_REQUEST {
# case sensitive
if { [HTTP::uri] contains "aol" } {
pool aol_pool
} else {
pool all_pool
}
# case insensitive
if { [string tolower [HTTP::uri]] contains "aol" } {
pool aol_pool
} else {
pool all_pool
}
}
References:
https://clouddocs.f5.com/api/irules/contains.html
https://clouddocs.f5.com/api/irules/HTTP__uri.html
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