Create a mobile version of your site.

1. Login to the root directory of your site (typically the public_html directory) and edit or create the .htaccess file.

 

NOTE: You will need a standalone FTP application, like Transmit, that allows you to view invisible files to view the .htaccess file.

 

2. Paste the following code into your .htaccess file, replacing http://YourDomainGoesHere with the full URL of your site. (example http://www.mydomain.com)

 

#redirect mobile browsers
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$
RewriteRule ^(.*)$ http://www.google.com/gwt/x?u=http://YourDomainGoesHere&btnGo=Go&source=wax&ie=UTF-8&oe=UTF-8 [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$
RewriteRule ^(.*)$ http://www.google.com/gwt/x?u=http://YourDomainGoesHere&btnGo=Go&source=wax&ie=UTF-8&oe=UTF-8 [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*Palm.*$
RewriteRule ^(.*)$ http://www.google.com/gwt/x?u=http://YourDomainGoesHere&btnGo=Go&source=wax&ie=UTF-8&oe=UTF-8 [R=301]

 

3. Save the .htaccess file and upload it to the root folder of your site.

 

 

Was this answer helpful? 12 Users Found This Useful (43 Votes)