我想编辑.htaccess,将下面的行放在一行中:
Redirect 301 "/smartphone" "/roster.php"
Redirect 301 "/mobile" "/roster.php"
我该怎么做
相应的RedirectMatch
指令允许您使用正则表达式。例如:
RedirectMatch 301 ^/(smartphone|mobile) /roster.php
参考:
- https://httpd.apache.org/docs/current/mod/mod_alias.html#redirectmatch