Create a directory ‘scripts’ in the root directory and add the following files to this directory:
Add the following code to ‘Header Code’ of one of the objects in the Master Page(s) for desktop use. The script redirects to a page with the name of the current page with the prefix m. when a mobile device is detected and the redirect file exists. It also adds the ‘alternate’ link to optimize the result of the Google crawlers.
Add the following code to the ‘Header Code’ of one of the objects in the Master Page(s) for mobile use. It adds the canonical reference to optimize the results of the Google crawlers This step is optional.
href="<?php echo($_SERVER['HTTP_HOST']."/".Substr(basename($_SERVER['PHP_SELF']),2)); ?>" >
In .htaccess file add the following line:
This line enables the execution of the php-
Add a mobile (child-