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)...
The_Bhattman
Nimbostratus
Sep 08, 2009Hi Yves,
I think you can also re-write this as
when HTTP_REQUEST {
if { [HTTP::host] eq "www.mydomain.eu" } {
switch -glob [HTTP::uri] {
"/" { HTTP::respond 301 Location "http://www.mydomain.eu/zz/index.html"}
default { pool mydomain_eu_pool}
}
}
if { [HTTP::host] eq "www.mydomain.be" } {
switch -glob [HTTP::uri] {
"/" { HTTP::respond 301 Location "http://www.mydomain.eu/be/zz/index.jsp" }
default { pool mydomain_be_pool }
}
}
switch -glob [HTTP::host] {
"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" }
}
}
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