Forum Discussion
sundogbrew
Altocumulus
Nov 02, 2015pool redirect based on uri
So I have a list of like 9 different URIs that would be paths from one URL. I am wondering the best way to do it with an Irule. it would be
domain.com/
/bla1 insidepool:8101/bla1
...
Brad_Parker
Cirrus
Nov 02, 2015If you are worried about you list of URIs expanding you should start with a data group. Put all your URIs in a data group with their value set to the associated pool for that uri. i.e /blah1 would have the value field set to insidepool8101(or whatever you name the pool). The data group can be updated whenever you want to add an additional uri/pool. Then you can use an iRule like this. And yes, the pool selection will not affect the request being sent to the pool.
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::path]] starts_with "uriDataGroup" }{
pool [class match -value [string tolower [HTTP::path]] starts_with "uriDataGroup"]
}
else {
pool defaultPool
}
}
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