Thursday, February 10, 2011

How to make your website Compatible with Mobile Phones

Step 1: Make a mirror of your website


Step 2 : Create Global prepend file

1 Make all urls Mobile friendly
2.strip all unnecessary carriage returns tab, and extra spaces.
3. change anchored images with alt text to just plain text anchors.
4. strip all stylesheets , images,inline styles,scripts and comments(including RDF).
5. Tell search engine robots not to index or crawl the mobile version of the site so as to not create duplicate listings.

Make sure to replace “walrusfacts.com”with your domain name!


 Save the file global_prepend.php and upload it to the root folder of your server


Step 3: create global append file.

 

Copy and paste the following text into it.

            ob_end_flush();
?>
Save the file as global_append.php and upload it to the root folder of your server.

Step 4 : Edit .htaccess

In the root folder of your site there will  be a file called .htaccess. Download it and edit it in your favourite text editor.



Copy and paste the following code at the end of it

php_value auto_prepend_file /localfilepath/global_prepend.php
php_value auto_append_file /localfilepath/global_append.php

Save the file as .htaccess and upload it to the root folder of your server.




No comments:

Post a Comment