Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Problem with redirect to mobile site (https://www.warriorforum.com/programming/420046-problem-redirect-mobile-site.html)

Sovereign 23rd July 2011 03:03 PM

Problem with redirect to mobile site
 
Hi everyone,

I am having an issue with the mobile redirect script with my latest client.

I put the redirect script into the index.html file and when I type into the browser, www.MyClientWebsite.com, it will instantly redirect to m.ClientWebsite.com, which is what I need it to do.

If however, I type in: MyClientWebsite.com , without the www, as many people do, it will not redirect at all and just goes to the main site.

Anyone know what I am missing or how I can fix this?

Thanks in advance for any help,

Mike

TrueStory 24th July 2011 01:26 AM

Re: Problem with redirect to mobile site
 
do you mind copying redirect script so we can take a peek?

Depends on how you "check for mobile" device. Are you using Javascript to redirect?

KabanaSoft 24th July 2011 10:58 PM

Re: Problem with redirect to mobile site
 
Mike,

I have code that does this and just shared my code with a fellow warrior who asked at this thread: http://www.warriorforum.com/programm...ct-script.html

Send me a PM and i will send you the code that i am using to detect mobile users and redirect them to the mobile version of your site, it works nicely and even has a cookie preference if the user wants to view the full version of the site. Written in PHP.

I use the code from the http://blog.mobileesp.com/ to detect mobile users.

I highly recommend you taking a look at that site as well.


All times are GMT -6. The time now is 12:51 PM.