I've both www.example.com and m.example.com pointing to the same directory in Ubuntu and there was in the settings.php with this line:
$base_url="www.example.com";
I want to ask what will happen in this case in Drupal where sites are accessed as www. or the m. versions?
In the hook_custom_theme I'm returing a mobile theme whenever the URL is starting with "m.".
I was getting some wierd mix up of mobile and the desktop versions.
I was not able to find any cid with "http://m." URLs in the cache_page mysql table. After I removed this $base_url now both mobile and the desktop versions seem to be showing fine now and also cache_page table is having rows with cid with "http://m...".
I'm not fully sure this but could $base_url cause this?