I have a created a duplicate m.website.com that have mobile friendly contents in them. However there are still some desktop page that I did not create a mobile version for it and I don't wish to redirect them to the mobile.
Is there a htaccess code which allows me to redirect just the pages that I wanted to the same url on the mobile site based on the user agent of their device and yet pages that does not have the mobile version created stays in the desktop version? I also want them to be able to choose if they want to go back to the desktop version if they want it to with the links that go back to the desktop page.
www.website.com/page1.htm to m.website.com/page1.htm and www.website.com/page2.htm stay in desktop version if there no mobile version of it.
Thanks for all the help.
You should be able to do it like this:
Just set up a redirect for each specific page you want redirected to a mobile version.
Try this code in your
DOCUMENT_ROOT/.htaccess
file: