Forum Discussion
muzammil_88686
Nimbostratus
Nov 22, 2012Detecting Mobile Devices and Redirecting to different URL
Dear Dev Team,
-> Curretly we have the below iRule.
==========================================================
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] ...
muzammil_88686
Nimbostratus
Nov 22, 2012Thank you Steve!
How can I log if the Mobile device is detected? I tried using the log as below in If statement but it is not working.
if { [class match [string tolower [HTTP::header User-Agent]] contains user-agent-dg ] } {
HTTP::redirect "http://www.test.com/abc/123/mypage/mobile-page"
log local0. "[IP::client_addr]:[TCP::client_port]: UA: [HTTP::header "User-Agent"], redirecting"
}
else {
HTTP::redirect "http://www.test.com/abc/123/mypage/?reset=true" }
}
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