I have tested out hundreds of different codes, either they work and screw something else up, or they don’t work at all. This sounds lazy but I really have tried hundreds of combinations.
I have my main domain that I want redirected to my “mobile” sub domain (detecting mobile agent), and along with a folder of .html pages I have. Both directories match up file name wise.
Any ideas for me?
Here is a website with information on how to redirect based on the browser’s user-agent string:
http://www.howtoforge.com/apache2-how-to-redirect-users-to-mobile-or-normal-web-site-based-on-device-using-mod_rewrite
Your .htaccess should look like so:
Make sure you update to the latest code above.
I have updated all of the code above to reflect what is should look like.