How to redirect the Smartphone and Tablet user's for different URL?

  • 1 August 2014
  • 2 replies
  • 1220 views

Currently use this script: http://goo.gl/UzEHbn (by markwainwright)

But I do not want the Tablets are redirected to the mobile page.

Mobile page on the tablet shows a lot of white space on the sides, this is why I want to take them to the desktop site.

My desktop and tablet site: http://cursos.aiec.br/administracao-m…
My mobile site: http://cursos.aiec.br/administracao-m…

Have a script that differentiates tablet and smartphone?


2 replies

Userlevel 2

Hi there,

The script uses a regular expression provided by detectmobilebrowsers.com, which actually does not count tablets as mobile devices Ð presumably for the same reason you mentioned.

It’s explained here: http://detectmobilebrowsers.com/about

So you should be good to go, without needing to modify the script at all! Tablet users won’t be redirected to the mobile page.

Mark

Thank you for that clarification!

Reply