We have a mobile site at http://example.com/m. (For a variety of reasons, we couldn’t follow the convention of m.domain .com or www.domain.mobi, so we are stuck with this url at least for now.)
We are using the Theme Switching option in Mobile Tools --- we want it to switch the theme for pages like example.com/m/services, example.com/m/about, etc.
However, this results in Mobile Tools switching the theme for any url which starts with “m”.
For example, if a user (mobile or not) visits http://example.com/may, Mobile Tools is switching the theme for that page.
I even tried using http://example.com/m/ in Mobile URL option. (Note / at end.)
That didn’t work either. So I did a hack in mobile_tools.module.
I replaced
$pos = strpos($uri, preg_replace('{/$}', '', $longest_url));
with this
$pos = strpos($uri, $longest_url);
and that fixed the issue.
Any specific reason why you are stripping last slash(/)?
And by the way, Thanks for this great module.
Note: I am not using Automatic redirect option from mobile tools as it will not work as expected since I am using boost to cache our pages.
I have posted solution here. http://drupal.org/node/681396
Comments
Comment #1
vikramy commentedComment #2
twom commentedComment #3
Anonymous (not verified) commentedSame thing in D7, but your workaround doesn't work for me.
Comment #4
minoroffense commentedMobile Tools 1.x is no longer supported.