PageFileName = listLast(cgi.script_name,"/"); if ( url.forcefullSite is 1 ) { // Set a cookie that the user wants to view the full desktop version of the site ---> cookie.forceFullSite = "True"; } if ( !structKeyExists(cookie,"isMobileBrowser") ) { // Run our device detection to see if this is a mobile device. Set cookie either way. null = application.ADF.mobile.mobileDetect(setCookie="1"); } if ( cookie.forceFullSite is "false") { if ( structKeyExists(cookie,"isMobileBrowser") and cookie.isMobileBrowser is "true" ) { // we have a mobile device. See if we have previously redirected it to the mobile site redirected = application.ADF.mobile.getMobileRedirectCookie(); // User has not been previously redirected. See if we're on the home page. if ( request.subsite.id EQ 1 and pageFileName EQ "index.cfm" ) { // Set our cookie flagging that a redirect has occurred. redirected = application.ADF.mobile.setMobileRedirectCookie(); // redirect to mobile site application.ADF.utils.pageRedirect("/mobile/index.cfm"); } } }