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_Wilke
MVP
Mar 09, 2017Hi phipse,
you iRule looks absolutely valid^^
For testing purposes you may try to the iRules below and then take a look to your logfiles...
Test1: Forwarding every request to pool_group1
when HTTP_REQUEST {
log local0.debug "iRule executed..."
pool pool_group1
}
Test2: Same as your iRule with added logging
when HTTP_REQUEST {
log local0.debug "Debug: iRule executed..."
switch -glob -- [HTTP::uri] {
"/diagnostics/*" {
log local0.debug "Debug: Hit the /diagnostics path."
persist source_addr 255.255.255.255 1800
pool pool_group2
}
default {
log local0.debug "Debug: Hit the default path"
pool pool_group1
}
}
}
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