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, 2009Modified the iRule to add logging
when HTTP_REQUEST {
if {([HTTP::host] eq "www.mydomain.be") and ([HTTP::uri] eq "/")} {
HTTP::respond 301 Location "http://www.mydomain.eu/be/zz/index.jsp"
log local0. "This was reached when the url was http://[HTTP::host][HTTP::uri]"
} elseif {[HTTP::host] == "www.mydomain.be"} {
pool mydomain_be_pool
return
log local0. "This was reached when the url was http://[HTTP::host][HTTP::uri]"
} elseif {[HTTP::host] eq "www.mydomain.nl"} {
HTTP::respond 301 Location "http://www.mydomain.eu/nl/zz/index.jsp"
log local0. "This was reached when the url was http://[HTTP::host][HTTP::uri]"
} elseif {[HTTP::host] eq "www.mydomain.fr"} {
HTTP::respond 301 Location "http://www.mydomain.eu/fr/zz/index.jsp"
log local0. "This was reached when the url was http://[HTTP::host][HTTP::uri]"
} elseif {[HTTP::host] eq "mydomain.fr"} {
HTTP::respond 301 Location "http://www.mydomain.eu/fr/zz/index.jsp"
log local0. "This was reached when the url was http://[HTTP::host][HTTP::uri]"
}
if {[HTTP::host] eq "www.mydomain.lu"} {
HTTP::respond 301 Location "http://www.mydomain.eu/lu/zz"
log local0. "This was reached when the url was http://[HTTP::host][HTTP::uri]"
} elseif {[HTTP::host] eq "www.mydomain.eu" and [HTTP::uri] eq "/"} {
HTTP::respond 301 Location "http://www.mydomain.eu/zz/index.html"
log local0. "This was reached when the url was http://[HTTP::host][HTTP::uri]"
} else {
pool mydomain_eu_pool
log local0. "This was reached when the url was http://[HTTP::host][HTTP::uri]"
}
}
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