Forum Discussion
scottl_82413
Feb 04, 2010Nimbostratus
Redirect via Round Robin
Hello,
I'm not sure if an iRule is the best way to do this, or if the LTM can handle it in a better way.
We're going to publish a single URL - www.url.com, but need to re...
Colin_Walker_12
Feb 04, 2010Historic F5 Account
First I'd ask, is there a reason you actually want to redirect to different host names, and not just different servers fed by a single host name? If you have www.url.com pointed to your VIP on your LTM and 3 servers in the pool that VIP feeds, you'd have RR load balancing taken care of already.
Regardless, if you actually want to do redirects to those host names you could do something like:
when CLIENT_ACCEPTED {
set c 0
}
when HTTP_REQUEST {
switch c {
0 {
HTTP::redirect "http://www1.url.com"
incr c
}
1 {
HTTP::redirect "http://www2.url.com"
incr c
}
2 {
HTTP::redirect "http://www3.url.com"
set c 0
}
}
}
That's a simple take on it without any error checking, but you get the idea. Hopefully it gets you started.
Colin
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