1 Reply Latest reply: Aug 15, 2010 11:58 PM by Lon Winters RSS

    Having my site recognize a mobile device and redirect to the mobile site

    BearHNC Community Member

      I have been reading up on how to make my website detect a mobile device and the redirect to a mobile site, and there seems to be a consenses that PHP or WURFUL is the way to go, but I am at a loss on how to actually do that. I have heard so many different suggestions none of which really made any sense to me, I am NOT a developer, WIZYWIG ishow I roll, I am very new to the code world and this all seems very advanced to me. One place where I am really confused is; do I have a separate PHP in my root folder, then on my index page call a function to the PHP page on load and that PHP redirects the user? If so how do I do this, can somebody send me in the right direction because I am lost?

      Thanks in advance.

       

      Here is the link to the site I will need to be redirecting off of if you can give me advice based upon that.

      http://www.mmsi.com

        • 1. Re: Having my site recognize a mobile device and redirect to the mobile site
          Lon Winters Community Member

          What do you mean by "Do I need a separate PHP in my root folder?"  Do you mean a separate PHP page?

           

          Have you created the mobile version of your site?

           

          I guess I don't know about all these other solutions out there, but I thought all you need was a detection script that detects the browser that's being used, not the device. This is captures in a pre-defined server variable and the exact code and syntax depends on what web server your site is on. 

           

          So basically, on your index page you retrieve this server variable to detect the browser, and if it's determined to be a mobile browser or mobile version of a browser then you simple redirect to your mobile site's index page.

           

          Another thing to think of tho, is given the various mobile platforms these days is that if you actually want to redirect. For example, if Mobile Safari is detected then that means it's an iPhone, iPod Touch or now even, iPad. Very few sites redirect these, if any, especially with the iPad in the mix. But, Browsers that are in a flip phone or something with the small screen you will want to redirect.