我希望将m.example.com
重定向到example.com/index.php?type=mobile
,同时继承我已经为example.com
编写的规则......
所以,比如说,我已经定义了N个规则:
^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
无需重写m.example.com
子域的每一个,m.example.com
是否有办法继承相同的规则,但子域标志为type=mobile
?基本上,无需为位于m
子域文件夹中的.htaccess添加N行:
^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
答案 0 :(得分:1)
答案 1 :(得分:0)