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)...
yves_werniers_1
Nimbostratus
Sep 08, 2009Sorry, but it does not work.
If I make it
when HTTP_REQUEST {
if {[HTTP::host] == "www.mydomain.be" and [HTTP::uri] equals "/"} {
HTTP::respond 301 Location "http://www.mydomain.eu/be/zz/index.jsp"
}
elseif {[HTTP::host] == "www.mydomain.be"} {
pool mydomain_be_pool
}
I get sent to the pool at the very end of the irule.
If I make it
when HTTP_REQUEST {
if {[HTTP::host] == "www.mydomain.be" and [HTTP::uri] equals "/"} {
HTTP::respond 301 Location "http://www.mydomain.eu/be/zz/index.jsp"
}
elseif {[HTTP::host] == "www.mydomain.be"} {
HTTP::redirect "http://www.anotherdomain.be"
}
I get redirected to that anotherdomain, so it does evaluate to get in that part of the script, but the pool selection is not doen well?
And I use HTTP::respond 301 because I want a "moved permanently" response (for search engine spiders and the like) insteda of a "moved temporarily" that is sent by a HTTP::redirect.
yves
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