Forum Discussion
irule to direct /sample to pool others to default
I am coming up with the following for when somone hits the /samples uri they go to pool H3DEV_EA but when they don't hit that we want them to go to another pool(unfortunatle only one pool(server) built at the moment )
I keep getting an error with the following irule. Any help on my sytax woudl be greatly appreciated.
originally came up with this.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
/sample* - {
pool pool_A
}
default {
pool pool_B
}
}
}
}
But then came up with teh following after reading this(http://support.f5.com/kb/en-us/solutions/public/7000/900/sol7988.html)
rule switch_rule2 {
when HTTP_REQUEST {
switch -glob [string tolower[HTTP::uri]] {
"/sample*" - {
pool H3DEV_EA
}
default{
pool H3DEV_EA
}
}
}
}
1 Reply
- nitass
Employee
can you try this?[root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/sample*" { pool H3DEV_EA } default { pool H3DEV_EA } } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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