Forum Discussion
Damien_Turner_1
Nimbostratus
Aug 02, 2010Redirect if your a mobile user....
Hi all, I was wondering if I could have some help!
I have been asked if it is possible to use an iRule to redirect a mobile user to a new URL.
An example would be....
user on an iPhone goes to www.m...
What_Lies_Bene1
Cirrostratus
Oct 29, 2012pmaubo2 I'd recommend you do a packet capture and inspect the User-Agent for each device and then use something like what I've put below. Just remember that User-Agent values may change between iOS and Android versions. I'm sure a quick Google would help with that.
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::header User-Agent]] contains XXXX ] } {
HTTP::redirect "http://onesite.com"
return
}
elseif { [class match [string tolower [HTTP::header User-Agent]] contains XXXX ] } {
HTTP::redirect "http://anothersite.com"
}
}
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
