Detect iPhone browser in .htaccess/apache and redirect to iPhone site
问题 Is it possible to detect iPhone browser agent in .htaccess and redirect the user to the correct iPhone page? 回答1: Sure you can - #redirect mobile browsers RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$ RewriteRule ^(.*)$ http://mobile.yourdomain.com [R=301] RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$ RewriteRule ^(.*)$ http://mobile.yourdomain.com [R=301] RewriteCond %{HTTP_USER_AGENT} ^.*Palm.*$ RewriteRule ^(.*)$ http://mobile.yourdomain.com [R=301] Taken from here 回答2: A little Googling,