I was looking for a way to redirect based purely on subdomain (a'la www/m/touch/x .facebook.com)
I eventually solved it by editing one of the method files - Originally checkmobile_dont_check.php but when this didn't work (is this PHP file depreciated now?) I successfully added it to checkmobile_always_iphone.php
My simplistic code is:
function CheckMobile()
{
$domain = $_SERVER['HTTP_HOST'];
switch($domain) {
case "m.yourdomain.com": return 'xhtml';
case "touch.yourdomain.com": return 'iphone';
case "wap.yourdomain.com": return 'wml';
case "imode.yourdomain.com": return 'html';
case "www.yourdomain.com": return 'html';
default: return 'html';
/* etc etc.... */
}
}
But a nice feature would be to have this kind of setting manageable from the admin control panel.
I eventually solved it by editing one of the method files - Originally checkmobile_dont_check.php but when this didn't work (is this PHP file depreciated now?) I successfully added it to checkmobile_always_iphone.php
My simplistic code is:
function CheckMobile()
{
$domain = $_SERVER['HTTP_HOST'];
switch($domain) {
case "m.yourdomain.com": return 'xhtml';
case "touch.yourdomain.com": return 'iphone';
case "wap.yourdomain.com": return 'wml';
case "imode.yourdomain.com": return 'html';
case "www.yourdomain.com": return 'html';
default: return 'html';
/* etc etc.... */
}
}
But a nice feature would be to have this kind of setting manageable from the admin control panel.