Hi everyone,
I'm trying this code on evo site,
if I remove the && (!isset($_COOKIE["mobileDevice"])) cookie check it works fine and redirect to mobile site.
The cookie is created on the mobile site and I can see it in the document Info.
<?php
define(MOBILE_PATH, "assets/snippets/mobiledetect/");
$output = "";
include($modx->config['base_path'].MOBILE_PATH.'mobile_device_detect.php');
$mobile = mobile_device_detect();
if ($mobile==true) && (!isset($_COOKIE["mobileDevice"]))
{
header('Location:http://m.mydomain.com/');
}
exit;
?>