Forum Discussion
Vaughn_96017
Nimbostratus
Jun 27, 2007Redirect based on user browser (mobile)
I am writing an iRule that states if the user is coming in via a mobile device to get redirected to a different pool. My question, here is what I have, is this correct?
when HTTP_REQUEST {
...
Wil_Schultz_101
Nimbostratus
Jun 27, 2007I use a variation of the following
when HTTP_REQUEST {
if {([string tolower [HTTP::host]] contains "my.com")} {
switch -glob [HTTP::header User-Agent] {
"*BlackBerry*" -
"*Blackberry*" -
"*Java/1.4.1_02*" -
"*Blazer*" -
"*blazer*" -
"*palm*" -
"*Palm*" -
"*SMARTPHONE*" -
"*Smartphone*" -
"*smartphone*" -
"*Danger*" -
"*hiptop*" -
"*MOT-*" -
"*RAZR*" -
"*AUDIOVOX*" -
"*Symbian*" -
"*symbian*" -
"*NOKIA*" -
"*Nokia*" -
"*Sony Ericsson*" -
"*Samsung*" -
"*LG 8*" -
"*Alcatel 735i*" -
"*Nextel*" -
"*Windows CE*" -
"*NetFront*" {
pool mobile_pool
}
}
switch -glob [HTTP::header Accept] {
"*text/vnd.wap.wml*" {
pool mobile_pool
}
}
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
