Forum Discussion
iRule to redirect and select node/pool
I'm not sure if this logic can work as it stands. The reason the pools are ignored is that you are just redirecting the user back to the same virtual server, where the new URI will not trigger the pool select, because there is no condition for eq "/do/login" once they are redirected. Then the problem becomes how to differentiate between someone who started at / and someone who started at /def.
You can solve this by having different login pages for each pool of servers so that you can capture the difference once they are redirected.
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" } { HTTP::redirect "https://app.com/do/login1/" }
elseif { [HTTP::uri] eq "/def" } { HTTP::redirect "https://app.com/do/login2/" }
elseif { [HTTP::uri] starts_with "/do/login1/" } { pool "abc_pool" }
elseif { [HTTP::uri] starts_with "/do/login2/" } { pool "def_pool" }
else { return }
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
