Forum Discussion
PG0581
Cirrus
Apr 05, 2018Redirect 2 URLs to one specific pool member
I'm new to creating iRules and would like to redirect URLs containing "/abc/123/" or "/def/456/" to a pool pool_abc and the specific pool member 1.1.1.1:port
Will this work? Or am I way off? ...
jaikumar_f5
Noctilucent
Apr 05, 2018Yes you can go with that, but your pool member selection part may be wrong,
when HTTP_REQUEST {
if { ( [string tolower [HTTP::uri]] contains "/abc/123/" ) || ( [string tolower [HTTP::uri]] contains "/def/456/" ) } {
pool pool_abc member 1.1.1.1 80
log local.0 "URI contains condition matched, member 1.1.1.1 80 selected"
} else {
pool different_pool
log local.0 "URI contains condition NOT matched, different_pool selected"
}
}
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
