How do I configure Cocoon to redirect mobile browsers to a mobile site?
-
27-10-2019 - |
Question
I have two Cocoon sites: ABC and ABC-mobile.
If the user is coming from a mobile browser, then I want them redirected to ABC-mobile. How do I accomplish this?
Solution
You need to detect the user agent. In Cocoon the Browser-Selector
component does exactly that (you associate browser names to user agents in your sitemap - see documentation).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow