Forum Discussion
Gonzalex_330537
Oct 30, 2017Cirrostratus
The reason your script is not working is because of the 'HTTP::redirect "/uri_x"' command. The redirect command is only sending a redirect to the client and forcing a reconnection back to the virtual server. The redirect command is not actually doing anything to the backend servers (pool members).
Instead of the redirect, edit and change the actual uri string, before the "pool [...]" command. Something like this:
HTTP::uri = "/uri_x"
if (criteria_A) { HTTP::uri = "/uri_x" pool pool_A } elseif (criteria_B) { HTTP::uri = "/uri_x" pool pool_B }
DON'T FORGET TO ASSIGN A DEFAULT POOL FOR A CATCH ALL SITUATION. That should do the trick.