Doran_Lum_13484
Oct 05, 2015Nimbostratus
HTTP Path redirect for Splunk
Hi all, I have one VIP which is running the irule below to direct traffic to either of the 3 servers depending on the url from the users.. Users will enter https://test.domain.com/server1 or https://test.domain.com/server2
AT the backend, the server is listening on port 8000. On the server itself, I could reach the server with
I try both the irule below and it's not working. On Chrome, I'm getting "ERR_CONNECTION_REFUSED".
when HTTP_REQUEST {
if { [HTTP::path] starts_with "/server1" } {
pool Pool_server1_8000
} elseif { [HTTP::path] starts_with "/server2" } {
pool Pool_server2_8000
} elseif { [HTTP::path] starts_with "/server3" } {
pool Pool_server3_8000
}
}
when HTTP_REQUEST {
if { [HTTP::path] ends_with "_server1" }{
pool Pool_server1_8000
} elseif { [HTTP::path] ends_with "_server2" }{
pool Pool_server2_8000
} elseif { [HTTP::path] ends_with "*server3" }{
pool Pool_server3_8000
}
}