I have a functioning site using mobile tools 2.4. Today I tried updating to 2.6 and immediately got the evil "too many redirects" problem when attempting to visit the site using the mobile url. I'm not sure if I've had this setup misconfigured for a year, or if something has broken.

General configuration:
mobile url: http://m.example.com
desktop url: http://www.example.com
Redirection options:
Enable automatic redirection of the mobile user
Device detection module:
Mobile Tools
Theming configuration:
Switch theme based on the URL

A mobile theme is set.
Add mobile tools header is enabled.
No per-device filters are enabled
In settings.php, $base_url is unset; $cookie_domain is '.example.com'
My server is running nginx 1.2.3

After installing 2.6 and running the updates script, visiting http://www.example.com from a desktop browser is OK.

If I attempt, from a desktop browser, to visit http://m.example.com/?device=mobile I get the "too many redirects" error.

If I attempt to visit http://m.example.com from a phone (Android, if that makes a difference) I also get "too many redirects"

Am I doing or have I done something wrong, or is this breakage? Thanks.


aze2010’s picture


seumas.gagne’s picture

I'm having the same problem.

Positiff’s picture

So do I

jimboh’s picture

Priority: Normal » Major

I started without the change to settings file (I use example.com and m.example.com) and experienced a few problems so changed the settings file as recommended. 2 browsers (Ie and FF) were working fine but chrome was giving this too many redirects error. I assumed it was a cookie issue so deleted the cookies for both domains, no change. I then deleted all cookies and browsing history etc and that fixed it.
Problem is If I enable automatic redirection now I wont know if any users got cookies set during the initial activation (ie would be receiving the too many error), its a busy online ordering site and cant afford to lose custom this way. Unfortunately I had the lifespan at the default so will have to wait 30 days for expiry.

My question: The browser is looping between the mobile and full site ips... can this module detect the loop and display a message saying clear cookies of even better clear the cookies automatically and just go to one url or the other and not loop?

I also changed the priority to major as it does prevent the auto redirect from being used as there is a risk this may prevent users accessing my site.