Forum Discussion
htuytela_37346
Nimbostratus
Dec 20, 2013host header load-balancing
Hi,
I'm having a question on host-header load balancing, or something similar. To be more specific, I have a conditional irule where the pools listen to different URL's.
This is what I have at t...
Colin_Walker_12
Dec 23, 2013Historic F5 Account
So what it sounds like you need is to balance based on URI first, and then User-Agent after that. I.E. if the user is accessing msie.foo.com/login, then decide where to route things based on their User-Agent. Otherwise, send everything to the default pool, since it is the one that is set up to handle all of foo.com. Does that sound correct?
If so, you're awfully close, and just need to add another conditional. Try this:
when HTTP_REQUEST {
switch -glob [HTTP::header value "User-Agent"] {
"_MSIE 6_" -
"_MSIE 7" -
"_MSIE 8" {
if {[HTTP::uri] eq "/login"} {
pool site-10.130.14.98_9610
} else {
pool site-10.130.14.98_29710
}
}
default {
pool site-10.130.14.98_29710
}
}
}
- htuytela_37346Dec 23, 2013
Nimbostratus
Hi Colin, thank you for your reply. Basically, let me clarify some more. My problem is that I have 2 backend web servers that listen on different FQDN's, and that I need to redirect based on browser-type. So the URL, pointing to the F5, is www.foo.com. When IE used, the user is redirected to pool site-10.130.14.98_9610, but that server needs to suffix /login to give a valid response, so he is only listening to www.foo.com/login. The default server is listening www.foo.com. At this moment, the redirect based on IE works, but since the wrong FQDN is used, the users does not get the correct page displayed. So somehow, I need to make a conditional URL rewrite. Thanks, Hans
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