在编写.htaccess文件以重定向到一个完整的url/query字符串的新地址时寻找帮助
用户url输入:
http://www.example.com/path?query-string=something.或-
http://example.com/path?query-string=something有关的再加工将转用于:
http://subdir.example.com/path?query-string=something发布于 2018-05-12 16:25:31
您不需要担心查询字符串。
RewriteCond %{HTTP_HOST} example.com$
RewriteRule (.*)$ http://subdir.example.com/$1 [R]这将只适用于根目录中的.htaccess。
https://serverfault.com/questions/911920
复制相似问题