Hello,

First off, this module is awesome, thanks for building it.

Here's my setup: I've got my main site at mysite.com, and have set the mobile site to be m.mysite.com. I *think* I did everything correctly to set this up properly (set up the subdomain to redirect to the main domain, plus set up a symlink for the subdomain, plus created the directory root/sites/m.mysite.com). In my Mobile Tools settings, I'm switching themes based on the URL.

So my first problem has to do with bizarre URL redirection. When I test m.mysite.com on iPhone, it loads perfectly, using the different homepage I set as well as the mobile theme I installed, and I can navigate from there just fine and everything works perfectly. When I load mysite.com on the iphone, the mobile site loads fine as well, but it doesn't redirect to m.mysite.com. Instead, I get redirected to mysite.com/m.mysite.com. When I try loading m.mysite.com on a desktop browser, I am redirected to mysite.com/mysite.com (which just gives the desktop site's standard Page Not Found page). So, it seems like somewhere in the redirection process, that the URL that should be redirected to is getting tacked onto the end of the desktop URL.

My second problem is that, though m.mysite.com loads just fine on iphone, when I load it in Firefox with the iphone user agent enabled, Firefox behaves like a desktop browser and loads mysite.com/mysite.com. I can load other mobile sites fine in it, so it's not an issue with Firefox.

Anyhow, if anyone has any ideas on what I might not have configured correctly, etc., I appreciate any advice! Thanks!

Comments

ptocheia’s picture

Title: URL redirection + Firefox user agent issues » URL redirection issue (Firefox user agent issue dealt with)

OK, figured out the weird Firefox user agent issue. Apparently at some point I'd stuck a "?device=desktop" in front of the URL, "?device=mobile" fixed it back. So that's taken care of at least! (And the title of this thread is updated accordingly)

I've still got the strange redirect issue, and I'm wondering if this is some thing that I could fix with some sort of URL rewrite in .htaccess. Hmm...

ptocheia’s picture

Status: Active » Fixed

And, figured it out. Looks like I just needed to stick "http://" in front of the URLs under General Configuration on the Mobile Tools admin page, and that worked perfectly.

If this is always the case for how these URLs work, I'm wondering if mobile_tools.admin.inc needs a few descriptions updated to make this more clear? The current instruction is "Give the name of your mobile site. It is recommended to use the convention of m.domain .com or www.domain.mobi", and I wonder if it should be updated to "Give the name of your mobile site. It is recommended to use the convention of http://m.domain .com or http://www.domain.mobi" to cut down on confusion. If I had any idea how to make a patch I could make one for this!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.