Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using this option, your module invokes function mobile_tools_create_mobile_url($url) to create mobile link. But that function is flawed is that it creates link that starts with m.* by default.
There are settings for Mobile Tools (admin/settings/mobile-tools) where you actually specify the domain for mobile site.
I changed some part of mobile_tools.inc for my liking:
function mobile_codes_data_url_mobile_tools(&$data) {
global $base_url;
if (strpos($data, $base_url) === 0) {
$host = variable_get('mobile_tools_mobile_url',$base_url);
$url_parsed = parse_url($data);
if (!array_key_exists('path', $url_parsed)) {
$url_parsed['path'] = "";
}
$data = mobile_tools_prepare_url($host.$url_parsed['path']);
}
}