I want to redirect m.example.com
to example.com/index.php?type=mobile
while inheriting the rules I've already written for example.com
...
So, say, I have N rules already defined looking something like:
^view/([A-z]+) index.php?view=$1
^delete/([A-z]+) index.php?delete=$1
^page/view/([A-z]+)/([0-9]+) index.php?view=$1&page=$2
^page/delete/([A-z]+)/([0-9]+) index.php?delete=$1&page=$2
Without having to rewrite each of those for the m.example.com
subdomain, is there a way for m.example.com
to inherit the same rules, but with the subdomain flag type=mobile
? Basically, without having to add N more lines for an .htaccess located in the m
subdomain folder:
^view/([A-z]+) index.php?view=$1&type=mobile
^delete/([A-z]+) index.php?delete=$1&type=mobile
^page/view/([A-z]+)/([0-9]+) index.php?view=$1&page=$2&type=mobile
^page/delete/([A-z]+)/([0-9]+) index.php?delete=$1&page=$2&type=mobile