Forum Discussion
Jeffrey_Morrow
Nimbostratus
Jul 14, 2015iRule to load balance by browser type
I have an internal company request to load balance incoming requests by browser type. Is there an iRule already widely used in order to do this? Thanks in advance.
Jeffrey
VernonWells
Employee
Jul 28, 2015You can simply combine the two. This is an incomplete example, but should get you heading where you need:
when HTTP_REQUEST {
if { [HTTP::uri] eq "/"} {
switch -glob [HTTP::header value "User-Agent"] {
"*MSIE 6*" -
"*MSIE 7*" -
"*MSIE 8*" {
HTTP::redirect "http://larrymoecurly.mysite.com/wfc/loginIEHere"
}
default {
HTTP::redirect "http://larrymoecurly.mysite.com/wfc/login"
}
}
}
}
It would be possibly fruitful to read this article:
If it's possible, it may be more robust to have the client use Javascript to determine the version then insert that information in the request, in a header, or in a Cookie. This may be more reliable (and flexible) than using the User-Agent string.
Finally, if you are using at least 11.4.0, you can likely achieve what you want by using Local Traffic Policies:
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