Identify different mobile phones and redirect to different websites

Possible duplicate:
The standard way to detect mobile browsers in a web application based on an http request

I have 3 mobile versions of the website and I would like to present them on different phone models according to what they support. One version is monochrome WML, the other is WML color, and the other is XHTML for mobile devices.

What is the best way to identify a device in a request and know if it supports a version or another?

+1
java mobile wap
source share
1 answer

Check the User-Agent HTTP header in the incoming request and either use it to start the HTTP redirect, or if you use Apache, use mod_rewrite and RewriteCond to change the result based on the User-Agent, without requiring additional HTTP roundtrip that uses redirection.

+2
source share

All Articles