I am using 'Enable automatic redirection of the mobile user' to redirect a mobile browser to my mobile site (http://www.example.com to http://m.example.com). The redirection to the mobile site when using a mobile browser works fine.

However, if I access the mobile site from a desktop browser by directly entering the URL (http://m.example.com), the desktop browser displays the desktop site. I need to allow viewing of the mobile website from the desktop. Has anyone else seen this, or have any ideas as to what is going on?

Thank you

Comments

twom’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

When you go with the desktop browser to the mobile url... Is it redirecting to the desktop site?
If so, then that is the way Mobile Tools is designed:

A) When you enable redirection + theme switching on switch theme for a mobile device or switch theme for url:
- A mobile user going to the mobile url stays there and sees the mobile site
- A mobile user going to the dekstop url is redirected to the mobile url and sees the mobile site
- A desktop user going to the mobile url is redirected to the desktop url and see the desktop site
- A desktop user going to the desktop site sees the desktop site

B) When you don't enable redirection + theme switching for a mobile device
- A mobile user sees the mobile site
- A desktop user see the mobile site

C) When you don't enable redirection + theme switching based on url
- Whatever device going to the mobile url sees the mobile site
- Whatever device going to the desktop site sees the desktop site

However, you can overwrite in case A and B the behavior by appending: ?device=desktop or ?device=mobile or ?device= or ?device=auto. A desktop browser with ?device=mobile will be detected as a mobile device.... Maybe this can help you during testing?

I am not sure if that is the use case you are looking for?

liminu’s picture

I have tha same problem, the theme change based on the url, so if i access with a desktop i can't acces to the mobie version with the m.mysite.com, so the block doesn't change the theme to the mobile versions.
This problem is with the global redirect module.
I need to put ?device=mobile in the block, but the input format is not selectionable so it redirect only in home page

switzern’s picture

Try mysite.com/gomobile instead of m.mysite.com.

That worked for me.

nitebreed’s picture

Category: support » feature

When using option c (comment #1) it is possible to show the mobile site to desktop users (for example when visiting m.example.com).

But I don't like it that you can't use automatic redirection with it and still let desktop users see m.example.com.

Putting this as a feature request.

trazom’s picture

Thank you for this explanation. I have mobile tools set up and activated on my desktop site (site.com), and users on the mobile phone get redirected to the mobile site if they try to reach my desktop site.

To get this to work -- I mean, for desktop users who try to reach my mobile site at their desktop but need to be redirected back to the desktop site -- do I need it to be set up and activated on my mobile site (m.site.com) as well? My mobile site is a domain alias (m.site.com) of my regular site (site.com). Thank you.

lerivin’s picture

I have my Mobile Tools setup based on twon's options A. However, when I allow users to override via device?.... the browser gets into an infinite redirect. This causes the browser to display a "too many redirects" message. It seems somewhere the redirect by Mobile Tools is causing Global Redirect to kick in, which in turn causes the whole process to repeat. Has anyone had this issue and know a resolution?

SandraL’s picture

I'm having the same problem as #6. Appending "?device=mobile" to the url causes an infinite redirect.

Edit: this happens with both the regular domain and the "m." domain.

lukewertz’s picture

@lerivin & @SandraL:

I was experiencing this same issue, then I realized that it was a problem with my logic, not the module. You need to visit the mobile site with the force "?device=mobile" (i.e.: http://m.domain.com/?device=mobile) in order to see the mobile site. If you visit the desktop site and try to force the device, it'll redirect you to the mobile, the force is not carried over and the mobile site redirects you back to the mobile and then you get your infinite loop.

nilofar123’s picture

hi
i have problem with theme switching when i set mobile theme in mobile tool using "Switch theme for a mobile device" this mobile theme set to desktop site what i do
suggest me please?

minoroffense’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

1.x is no longer supported