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


Currently use this script: (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:…
My mobile site:…

Have a script that differentiates tablet and smartphone?


Hi there,

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

It’s explained here:

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.



Thank you for that clarification!