Forum Discussion
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
}
}
1 Reply
- Doran_Lum
Nimbostratus
HI all, would this be a better way to redirect ?
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] eq "https://test.domain.com/server1"}{
HTTP::redirect " [HTTP::uri]"
} }
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