开发者

How do I configure Cocoon to redirect mobile browsers to a mobile site?

开发者 https://www.devze.com 2023-03-02 16:33 出处:网络
I have two Cocoon sites: ABC and ABC-mobile. If th开发者_如何学编程e user is coming from a mobile browser, then I want them redirected to ABC-mobile. How do I accomplish this?You need to detect the u

I have two Cocoon sites: ABC and ABC-mobile.

If th开发者_如何学编程e user is coming from a mobile browser, then I want them redirected to ABC-mobile. How do I accomplish this?


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号