Mobile and Tablets sites

This post is also available in: Romanian

More of the people I know, started to complain that the browsers on smartphones and tablets do not have convenient sites with easy and accessible interface for this type of Internet user. For that, it seems that is required by the site administrator so dedicated to present a version specially created for these visitors. Server-side settings can implement a redirection of these visitors to a page dedicated to using the .htaccess file of that site.
One way to detect and redirect Android users is using the following code:

RewriteCond %{HTTP_USER_AGENT} ^.*Android.*$
RewriteRule ^(.*)$ http://android.site-ul_meu.com [R=301]

This will redirect those users to http://android.siteul_meu.com instead of http://siteul_meu.com. There in that path I can include info to be accessed by Android users.

For the IPad users I have this code:

RewriteCond %{HTTP_USER_AGENT} ^.*iPad.*$
RewriteRule ^(.*)$ http://ipad.domeniul_tau.com [R=301]

and with this I will redirect my visitor to http://ipad.domeniul_tau.com.

As you can see this lines can be included on one .htaccess file and then all you have to do is to wait 😀

Success with your redirects !!!

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload CAPTCHA.