Common Host redirect with different URIs
Hi,
What I thought was quite a simple issue, but am struggling to resolve.
I would like to redirect to a pool, lets say POOL_1 with one node (at the moment) http://1.2.3.4:8080/uri_x and then secondly to redirect to another pool, POOL_2 with another single server but same uri - http://4.3.2.1:8080/uri_x
Whilst apparently initially working, opening 2 tabs causes the first tab with site 1 to change to site 2 if site 2 is opened on tab 2. Also, a refresh of either page after some time brings about a 404 - but am guessing that this is because of nothing accounting for
I have tried the following initially but have been round in circles with switch, string map, and various persistence settings - all without any progress. We rewrite 'all' in the http profile because of the application.
Any help really appreciated. Thank you.
if {([HTTP::host] equals "site1") && ([HTTP::uri] starts_with "/uri_1")} {
pool POOL_1
HTTP::redirect "/uri_x"
}
elseif {([HTTP::host] equals "site1") && ([HTTP::uri] starts_with "/uri_2")} {
pool POOL_2
HTTP::redirect "/uri_x"
}