Detect iPhone and Redirect / Script


If you wish that your website automatically detects when your visitor is accessing with a mobile device (like iPhone) and when is redirecting to another website, use simply a PHP or Htaccess code:


PHP


<?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== FALSE)
{ header('Location: http://mysite.com/iphone/'); }
?>

Htaccess


RewriteEngine on
RewriteCond ${HTTP_USER_AGENT} iPhone
RewriteRule .* http://mysite.com/iphone/

Comments




 



Copyright © 2017 epictrim. All rights reserved.What we doOur WorkInsideIdeasJoin UsContact Us