Coldfusion Detect mobile device


This code detects if the browsing media is a mobile/wap device and redirects to a new directory.

Quote:
<CFIF CGI.HTTP_ACCEPT CONTAINS “text/vnd.wap.wml”>
<CFLOCATION URL=”/wap/index.cfm”>
</CFIF>

NOTE: This is untested but I have seen this code used on live projects.

Leave a Reply

Your email address will not be published. Required fields are marked *

About Host Media

We have been hosting websites since 2002 and are always moving forward. All articles written under the Host Media author are created by the team who support our customers.

Category

ColdFusion/Railo & MySQL

Tags

, , , , ,