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...
hoolio
Cirrostratus
Aug 04, 2010Can you remove the * from the datagroup entries? Those will be interpreted literally--not as wildcards.
Are you on 9.4.4 or higher? If so, can you also remove the $:: prefix from MobileUserAgents?
Else, can you add logging to the rule and check /var/log/ltm for the output:
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: UA: [HTTP::header "User-Agent"]"
if {[matchclass [HTTP::header "User-Agent"] contains $::MobileUserAgents] } {
HTTP::redirect "http://m.holidayextras.co.uk[HTTP::uri]"
log local0. "[IP::client_addr]:[TCP::client_port]: UA: [HTTP::header "User-Agent"], redirecting"
}
}
Aaron
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
