I want my website to redirect mobile users from mydomain.com to m.mydomain.com (unless they have specifically asked to see the non-mobile site).
I was doing this in my application using WURFL, but I want to enable page caching. If page caching is on, the application will never be reached to know to redirect the mobile user, and so I need nginx to do this.
Apache has modules such as Apache Mobile Filter that make use of WURFL.
Is there any good way to detect a mobile browser in nginx? I'd rather not just come up with a user-agent regex since there are so many different mobile user agents that are always changing.