With an Apache server if it is possible Let me pass a part of a URL string. For instance if an individual finds footwear on the internet search engine and would go to example.com/shoes Let me redirect these to m.example.com/shoes but my .htaccess redirect only passes these to m.example.com.


This is going to do that which you have requested:

RewriteRule ^(.*)$ http://m.example.com/$1 [R=301,L]