I want to detect mobile users based on their user_agent.
If a user is browsing the full version of the site and they have a certain user_agent, I want to redirect them (using mod_rewrite) to the mobile site - if the mobile page exists.
Full site URL example http://www.domain.com/page1.html Equivalent mobile site URL example (note .htm instead of .html) http://m.domain.com/page1.htm
I need to do this with apache and not something like php
Bonus: The mobile site could have links to the full site (if the page doens't have a mobile equilelant) and I want to keep redirecting people and I want to continue the redirection unless people click on a "Full Site" link which will opt them out of redirection via a url parameter - ex: ?ver=ful