Skip to main content
Updated with more details relevant to question
Source Link
B00MER
  • 8.3k
  • 2
  • 21
  • 49

Magento has this built-in already:

enter image description here


UPDATE:

Apologizes for missing the redirecting portion of your question, most likely you'll want to take a look at something like a lightweight php class to use in your index.php to determine such. If you can avoid the headaches of regular expressions with .htaccess, its always best.

Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment. http://mobiledetect.net

Magento has this built-in already:

enter image description here


UPDATE:

Apologizes for missing the redirecting portion of your question, most likely you'll want to take a look at something like a lightweight php class to use in your index.php to determine such. If you can avoid the headaches of regular expressions with .htaccess, its always best.

Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment. http://mobiledetect.net

Source Link
B00MER
  • 8.3k
  • 2
  • 21
  • 49