Active
Project:
Mobile Tools
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2011 at 13:18 UTC
Updated:
12 Dec 2012 at 07:21 UTC
Hi,
Hope someone can help me...
I do have a site running the domain access with multiple (sub)domains, now i did make a separate mobile site http://m.websitename.nl.
When i enable "Enable automatic redirection of the mobile user" it's working great for the mobile device. When i visit the site on www.websitename.nl with a regular browser it's going ok but when i visit location.websitename.nl i get redirected to www.websitename.nl...
Any ideas?
Cheers
Henk
Comments
Comment #1
bzsim commentedWe are having the same issue. We have Domain Access installed and when you visit the subdomain, you get redirected to the main website. Anyone looking into this?
Comment #2
slowflyer commentedsubscribe
Comment #3
nonsieOut of curiosity how are your domains set up? is the m.example.com a new domain or a domain alias? is there a m.sub.example.com for each subdomain?
Comment #4
henkit commentedI use domein alias for the domains (creating domain pointers in dierct admin)
Sorry for the late Reply
Henk
Comment #5
nonsieThis is how I got it to work in my case (there's only a single mobile site for the default domain which is used for mobile users of any other subdomain):
1. add your mobile domain name to httpd.conf (needs to be alias of your default domain) or use control panel to add it (let's call it m.example.com)
2. enable Domain Alias
3. add your mobile domain as an alias for your default domain (eg m.example.com is an alias of example.com without redirect)
4. in Mobile Tools settings set mobile url to m.example.com and make sure desktop url is set to example.com. Check "Enable automatic redirection of the mobile user".
Comment #6
skizzo commentedWhat if each domain has a mobile site? Could the mobile_tools settings (in point 4 above) be handled by domain_settings module so that it can be set on a per-domain basis? [edit] somewhat related issue http://drupal.org/node/1206812
Comment #7
chawl commentedsubs
Comment #8
drvdt commentedI have a system like this: one code + one database.
Use Domain Access make some sites: http://tanghuyetap.vn ; http://yhvn.vn ; http://chidaotuyen.vn. They are shared contents but views-themes are different.
I want to use Mobile Tools to make mobile site for each of them: no redirect to m.sitename.vn ; only change theme when someone uses mobile. It was fine if you access all domain: form mobline --> see mobile themes, and from desktop --> see desktop themes.
My broblem: front page of desktop and mobile of main domain can be deffirent. But other domains can not: same front page. I want they must be different.
Can anybody help me?
Thanks so much,
Comment #9
slowflyer commentedHi drvdt,
maybe the context module could help you out. You can specify domain spefic "rules" which content or block to display.
cheers
Comment #10
Jevedor commentedHas there been anything resolved for this. I am having problems similar to what the OP has posted and I am wondering if a solution has been found.
Here is the scenario. I have 3 sites all on the same code base. Lets call them domain.com, ca.domain.com and mx.domain.com. The subdomains are regional versions of the default site. All three need to redirect to m.domain.com when hit via a mobile device. This currently is not working. Mobile detection seems to only occur when on the default domain.
What is more though is that when using a browser with mobile detection turned on if I go to ca.domain.com or mx.domain.com I am redirected back to the default domain which is not wanted or expected behavior.
Anyone have any thoughts or clues?
Comment #11
mjt772 commentedSubscribe
Comment #12
loophole080 commentedHi everyone,
I have a solution that allows a mobile site per domain (eg example.com/m.example.com, example.fr/m.example.fr).
Turns out to be quite simple in the end, here's what to do...
[NB We are NOT going to use Mobile Tools for the theme switching, we'll do that via Domain Theme from the Domain Access suite.]
1) Setup the Domain Access suite as you need, and configure your multiple domains (eg example.com, example.fr, etc.).
2) Create subdomain for each of your domains using the "m." pattern (eg m.example.com, m.example.fr, etc.).
3) Add a "domain record" in the Domain Access UI for each "m." subdomain.
4) Set the theme to your mobile one for each subdomain in the Domain Access UI (and any other per domain custom settings you need, eg languages). Make sure everything is working by visiting the "m." subdomains from your desktop browser.
5) Install and enable the Mobile Tools module. LEAVE THE SETTINGS AT DEFAULTS. So, on the Mobile Tools settings page the Mobile URL should match the "m." subdomain of your DA default domain and the Desktop URL should be your DA default domain. Under "Redirection options" leave the "Enable automatic redirection of the mobile user" disabled.
6) Create a custom module (in the snippet below it's called "MYMODULE") and paste in this hook_init() code:
7) Enable your custom module and test from your mobile for each main domain, eg example.com should redirect to m.example.com, etc and show mobile theme, language, etc as configured through Domain Access.
=================
This is particularly handy if you need different languages on each domain and a mobile equivalent. You can also now use the Domain Access publishing options to control what content is available on each individual mobile subdomain. You can also still use the Mobile Tools device override cookies too :-)
I'm just polishing off a little module to do this and also provide a "switch to desktop site" link when on a mobile. In the meantime, the above should get you going.
Comment #13
loophole080 commentedupdating title and status
Comment #14
minoroffense commentedComment #15
minoroffense commentedComment #16
koritala.mahesh commentedhi,
this is mahesh, i need one small help regarding..i have my website named as xxx. if i access my website in mobile devices, i need to get the url as m.xxx(mobile.websitename). how can i get like this ? could any one please send the code to my mail. my mail id is koritala.mahesh@gmail.com. i hope will expect atleast one for this... thank u