Forum Discussion
Redirect to another Pool
your code is not too complete as it starts with 'elseif'.. so not clear.
Also your code got strung together (put pre tags around code so we can read it). Is it?
elseif { ($requestURI starts_with "/rd/")} {
HTTP::respond 302 location "https://www.abc.com/";
TCP::close
} elseif {($requestURI equals "/")} {
pool ext_B pool
}
You seem to be doing two things: First redirecting path starting with /rd/ to the root path, and then second allocating the resource depending on the path.
Is it that you want anything starting with /rd/ to go to poolB and that it should also all be on the root path of poolB? ANything else goes to poolA? I would do that without any redirect..
if { $requestURI starts_with "/rd/" } {
HTTP::path "/"
pool poolB
}
Make the virtual server default pool poolA. So everything would go to poolA unless the path starts with /rd/. In that case it would use poolB and replace the path with the root path on that pool of servers.
Do you really want a redirect for all paths starting with /rd/ to go to the root?
Recent Discussions
Related Content
* 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