Forum Discussion
chief_rocka_334
Nimbostratus
Jun 01, 2018Is it possible to route traffic in an if statement to a single IP and port without doing a redirect?
I have this right now but this redirects the browser to the IP which is not accessible by the browser, it's only visible to LTM. I was hoping for a way that just passes the request to the new IP without a redirect.
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] starts_with "/wrongpath" } {
HTTP::redirect https://172.18.188.11:7777[HTTP::uri]
}
}
Yes, this is possible. You can a an second pool with pool member 172.18.188.11:7777 and use a LTM policy to forward traffic to this pool when the URI starts with /wrongpath.
Or you could use an iRule like:
when HTTP_REQUEST { if { [string tolower [HTTP::path]] starts_with "/wrongpath" } { pool pool_7777 } }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects