问题描述:

I've got a tricky one here. I have built a mobile website and successfully used a javascript user agent to redirect anyone on a mobile device (as long as they have javascript enabled!) from my desktop site to the mobile site.

The desktop site lives here: http://www.iirusa.com/epharmawest/

The mobile site lives here: http://www.iirusa.com/upload/wysiwyg/2011-P-Div/P1656/Mobile_web/home.html

The problem is that I am using DNS forwarding to send www.epharmawest.com to the location of the desktop site. This becomes an issue on a mobile phone because a user gets redirected twice in order to get from the desktop site to the mobile site.

The path a user takes is:

http://www.epharmawest.com

to

http://www.iirusa.com/epharmawest/welcome.xml

to

http://www.iirusa.com/upload/wysiwyg/2011-P-Div/P1656/Mobile_web/home.html

Does anyone have a recommended fix for this? I don't know if it is even possible to redirect just mobile users from http://www.epharmawest.com to the mobile website.

If you need the Javascript code I am using, you can reference it here: http://detectmobilebrowser.com/

Please help. Would extremely appreciate it!!

相关阅读:
Top