HOW TO ADD A MOBILE DETECTION CODE AND REDIRECT...

« See all FAQs for Premium Mobile Web Template

HOW TO ADD A MOBILE DETECTION CODE AND REDIRECT FROM YOU DESKTOP WEBSITE TO THE MOBILE VERSION


2 easy steps:

  • Go and download THIS mobile detection code and copy the file to your “desktop website” root folder.
  • Open you “desktop theme” main file (this must be a php file, if not you must create it .php) and right at the top include this code:

<?php   
include("Mobile_Detect.php");  
$detect = new Mobile_Detect();  
if ($detect->isMobile()) {     
header('Location: http://yourmobilewebsiteurl.com');  }    
?>  

Make sure you write your mobile website url corectly here: “http://yourmobilewebsiteurl.com

by
by
by
by
by
by