tags:

views:

489

answers:

2

I have 3 mobile versions of a website and would like to present each to different handset models according to what they support. One version is monochromatic WML, another is color WML and another is XHTML for mobile.

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

+2  A: 

Check the User-Agent HTTP header on the inbound request and either use it to trigger a HTTP Redirect, or if you're using Apache use mod_rewrite and a RewriteCond to vary the result based on the User-Agent without requiring the extra HTTP roundtrip that a redirect uses.

Ry4an
+1  A: 

Check this.

fravelgue