Forum Discussion
djkromarek
Nimbostratus
Jan 28, 2015iRule to set pool based on URI then persist based on clientIP
I have the following iRule that based on the URI, sends the clientIP to a specific pool. Once they are in that pool, no matter what host or URI they go to, I need them to persist to that pool.
when H...
StephanManthey
Nacreous
Jan 28, 2015Hi djschul,
in case there is a VIPCookie in the client request we probably can assume we have to handle a returning client:when HTTP_REQUEST {
if { [HTTP::cookie exists VIPCookie] } {
pool pool_thispool
} elseif { [string tolower [HTTP::host]] matches_regex "abc.com" } {
if { [string tolower [HTTP::uri]] starts_with "/test" } {
pool pool_thispool
log local0.alert [HTTP::host]
} else {
pool pool_defaultpool
}
}
}
Maybe using "ends_with" would be better than "matches_regex"?
Thanks, StephanHelp guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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