Last night I shared a trick to redirect Android users to your Android/mobile website with a simple PHP snippet. It's time to do the same with .htaccess file. Android is the most used smart phone platform right now, and is a hot topic for developers.
Add this following code to your .htaccess file to redirect users with Android User Agent to a specific address:
Add this following code to your .htaccess file to redirect users with Android User Agent to a specific address:
RewriteCond %{HTTP_USER_AGENT} ^.*Android.*$
RewriteRule ^(.*)$ http://android.yourwebsite.com [R=301]