jlwbps
8/25/2014 - 3:38 PM

Script for checking for mobile browser and redirect.

Script for checking for mobile browser and redirect.

<cfscript>
	// IS MOBILE BROWSER?
	REQUEST.isMobile = CreateObject("component","lib.cfc.utils.DetectBrowser").init().isMobile(CGI.HTTP_USER_AGENT);
	if (REQUEST.isMobile) {
		location(url="/mobile/",addToken="false"); // redirect into the mobile section of the application.
	}
</cfscript>