need http redirect and then pool selection based on local port
-a user goes to http://page.example.com
-they get redirected to https://page.example.com/URI_Path and use pool1
however, one of the applets within https://page.example.com/URI_Path sends the user a redirect with a location of: http://page2.example.com:8003/newURI_Path. This applet is served off a different node/member listening on port 8003.
so my solution was to create an iRule as follows:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect "https://page.example.com/URI_Path"
pool pool1
}
if { [TCP::local_port] equals 8003} {
HTTP::redirect "https://page.example.com/newURI_Path"
pool pool2
}
}
Where pool2 is the backend server listening on port 8003.
I'm sure there's a cleaner way to do this and I'd love any better ideas... But for now, I can't even get the 1st portion of the irule to work. I get the redirect, but it never goes to the pool. Note that I do not have any default pool set in my HTTPS virtual server.
Thanks