Forum Discussion
phipse
Altostratus
Mar 09, 2017iRule not hitting default pool?
Hi Guys,
I have created an iRule to select a pool based on the URL the user goes to.
testurl.com goes to pool_group1
testurl.com/diagnostics/* goes to pool_group2
The testurl.com/diagn...
Kai_M__48813
Cirrus
Mar 09, 2017it could be because you are searching on http::path, but im not 100% about this. But i have made a suggestion, that takes a slightly different approach:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "diagnostics"} {
pool pool_group2
persist source_adr 255.255.255.255 1800
}
else { pool pool_group1
}
}
Kai_Wilke
MVP
Mar 09, 2017Hai Kai, 😉
[HTTP::uri] or [HTTP::path] are in this specific scenario almost interchangeable. And adding a [string tolower] command is always a good idea if endusers are involved... 😉
Cheers, Kai
Help 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