Forum Discussion
kykong_107132
Nimbostratus
Jul 20, 2005redirect plus use pool
Hi All,
I have a requirement, the scenario is something like this.
www.abc.com map to VS IP (192.168.10.1)
if someone access to http://www.abc.com/test/
i like to send the connection to an ip address 192.168.10.2 at the sametime redirect the http_uri to connect.
http://www.abc.com/test/ -> http://www.abc.com/connect/
i have sometime here
==========================================
if (http_uri == "/test/") {
redirect to "http://%h/connect/"
}
else if (http_uri == "/connect/") {
use pool pool_192.168.10.2
}
============================================
i tested this rules is working but wondering is there any other way to configure this.
- Martin_MachacekHistoric F5 AccountI can't think of any better way how to achieve your desired behavior. Waht you have is IMHO the simplest and most effiecient solution. You should though consider changing your rule slightly. Unless you really want to discard all requests with URIs other than /test/ or /connect/ you should use:
if (http_uri == "/test/") { redirect to "http://%h/connect/" } else { use pool pool_192.168.10.2 }
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