so I have two websites example.com and example.com/mobile , when a user visits my site on a mobile device or tablets etc I would like for them to be redirected to the mobile.example.com.
I have tried editing my .htacess file but it doesn't seem to have any effect, I have also tried adding a JavaScript in the HTML head misc scripts but to no avail.
anybody have any ideas on how i can achieve this?
Best Answer
Magento has this built-in already:
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.