Forum Discussion
yves_werniers_1
Nimbostratus
Sep 08, 2009pool selection not working
Hello,
I have an irule attached to a virtual server (with no default pool).
In the rule there are some redirects and a pool selection. The pool selection (first elseif statement)...
Colin_Walker_12
Sep 10, 2009Historic F5 Account
Very nice work, cmbhatt! 😄
I think you'd either want to add an else clause as well, to avoid stepping into the additional switch at the end if you've already matched one of the above domains, or just incorporating the above nesting into the switch that you already have based off of the host. Something like:
when HTTP_REQUEST {
switch [HTTP::host] {
"www.mydomain.eu" {
switch [HTTP::uri] {
"/" { HTTP::respond 301 Location "http://www.mydomain.eu/zz/index.html" }
default { pool mydomain_eu_pool}
}
}
"www.mydomain.be" {
switch [HTTP::uri] {
"/" { HTTP::respond 301 Location "http://www.mydomain.eu/be/zz/index.jsp" }
default { pool mydomain_be_pool }
}
}
"www.mydomain.nl" { HTTP::respond 301 Location "http://www.mydomain.eu/nl/zz/index.jsp" }
"www.mydomain.fr" -
"mydomain.fr" { HTTP::respond 301 Location "http://www.mydomain.eu/fr/zz/index.jsp }
"www.mydomain.lu" { HTTP::respond 301 Location "http://www.mydomain.eu/lu/zz" }
}
}
Colin
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