Forum Discussion
gpayne_144568
Nimbostratus
Sep 29, 2014Switch Irule
I need to create an IRULE that takes a certain uri and redirects based on the start to specific pools. Would like to do this in switch format.
Any suggestions.
Ryannnnnnnnn
Altocumulus
Sep 29, 2014Hi mate,
You can give something like the following a shot:
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
switch -glob $uri {
"/somepath/dir1*" -
"/somepath/dir2*" {
pool POOL_my.site.com-443
}
default {
pool POOL_your.site.com-443
}
}
}
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