Forum Discussion
pablitop_134672
Nimbostratus
Sep 26, 2015Irule to redirect traffic based on path and uri
I have to redirect some traffic based on path and other based on uri. The irule should look something like this, but it´s not working. I should get working something like I post below. Any help?
...
giltjr
Nimbostratus
Sep 27, 2015Why not use the switch function for it all. I believe the switch command uses the first match so you could do:
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/bla/blabla.gif" { pool pool-frontend }
"/bla*" {pool pool-frontend2}
default {pool default}
}
}
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