Forum Discussion
chungyu_16122
Altostratus
Jul 10, 2012iRule to redirect mobile browsers
Hi all I started to use a irule I found on Dev Central to redirect blackberry, iphone, android, etc too a mobile site. But it semms that the re-direct is not able to take place, users just e...
nitass
Employee
Jul 10, 2012oops! sorry, user-agent value should be in lowercase.
when HTTP_REQUEST {
if { [string tolower [HTTP::host][HTTP::uri]] contains "www.mcgill.ca/desautels" } {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*blackberry*" -
"*iphone*" -
"*android*" -
"*windows phone os 7*" {
HTTP::redirect "http://desautels.mobilizeme.com"
}
}
}
}
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
