I’m using the following code to redirect mobile users:
#mobile redirect
RewriteCond %{REQUEST_URI} !^/mobile/.*$
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
Thing is, this redirects every page to the main page, e.g accessing http://www.site.com/folder/page with a mobile device will redirect to http://www.site.com/mobile. I’d like to edit the code so the same page will lead to http://www.site.com/mobile/folder/page, and I need this rule to apply for any page mobile users will try to reach.
This should do what you want: