I need to rewrite a url so that it adds a url variable to all requests to the a sub-domain.
Example:
m.mydomain.com ==> m.mydomain.com?mobileFormat=true
This is the flag that triggers the mobile version of my site to load.
Should be easy right? Everything I have tried so far isn’t working.
Here is the code I currently have in my .htaccess file:
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^([a-zA-Z0-9/-]+)$ /index.cfm%{REQUEST_URI} [PT]
RewriteRule ^locale/([^/]*)$ /?siteLocale=$1 [L]
RewriteCond %{HTTP_HOST} ^m\.(.*)$
RewriteRule ^(.*)$ m.%1/$1?mobileFormat=true [QSA]
Thanks for the help.
The solution I was looking for was:
Thanks for all of the help.