Forum Discussion
Mobile Device Detection with logic
If I go to www.site.com from my mobile device, I want to detect the mobile device and redirect to m.site.com. If I go to a specific URL as defined in a class (easier to expand the list as devlopers create additional optimized pages for mobile devices) for example www.site.com/uri1 and the device is detected as a mobile device, then redirect to m.site.com/uri1. If the class search comes up empty, redirect to m.site.com.
If I have gone through the detection already (as a user) and I choose to go to the full site by clicking a hyperlink on the mobile site (www.site.com/?mobile=false) then redirect back to www.site.com and exit from further processing. Of course I need a way to track the user so that they do not continue in a loop of going back to the mobile site.
I hope this helps! I thought that I was half way there but I just can't seem to make the logic after switch work. It always redirects me back to the mobile site. I was thinking that this would only need to go onto the www.site.com VS.....and yes, they are two separate VS's but I have not emotional tie to it being that way.
Recent Discussions
Related Content
* 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