Here's what I'm trying to do.
When you type m.example.com I want users to be redirected to example.com/m/ but I would like the url in the address bar to remain m.example.com if possible.
Here's what I'm trying to do.
When you type m.example.com I want users to be redirected to example.com/m/ but I would like the url in the address bar to remain m.example.com if possible.
You can do that with mod_rewrite and mod_proxy:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^m\.example\.com$
RewriteRule ^ http://example.com/m%{REQUEST_URI} [L,P]
Just set the subdomain's root dir to example.com/m/. Then there is no redirection.