ayman_Mosaad_25
Apr 28, 2018Nimbostratus
new pool in switch statement doesn't work
Hello guys, I've got no any previous experience with F5 and that why I need your support with the following.
This is existed and working irule script:
when HTTP_REQUEST {
switch -glob [HTTP::host] {
"xxx.xxx.net"
{
switch -glob [HTTP::uri] {
"/abc*"
{
pool POOL_abc
return
}
"/xyz*"
{
pool POOL_xyz
return
}
default
{
HTTP::respond 200 content [ifile get reserved_website]
return
}
}}
}}
I made new pool via GUI called foo and added new uri in the switch statement as below but it didn't work and there is no traffic is forwarded to foo pool. could you please help with the reason why this doesn't not work? Thank you!
when HTTP_REQUEST {
switch -glob [HTTP::host] {
"xxx.xxx.net"
{
switch -glob [HTTP::uri] {
"/abc*"
{
pool POOL_abc
return
}
"/xyz*"
{
pool POOL_xyz
return
}
"/foo*"
{
pool POOL_foo
return
}
default
{
HTTP::respond 200 content [ifile get reserved_website]
return
}
}}
}}