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_M__48813
Cirrus
Mar 09, 2017yeah..was a bit unsure about that...so i just used http::uri out of old habit, and probably a lack of coffee:D
string tolower should almost be mandatory, if you ask me..has saved me countless hours of troubleshooting, because of end users using capital letters when typing in the url..
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