在nginx 前端做rewrite转向,动态页转向某静态地址。
例如:
/home/index.html?growingId=([0-9]+)$ 转向到 /people/([0-9]+)
用下面的方法搞定。
if ($query_string ~ “growingId=(.*)”) {
set $growingId $1;
rewrite ^/home/index.html.* /people/$growingId/ last;
}
在nginx 前端做rewrite转向,动态页转向某静态地址。
例如:
/home/index.html?growingId=([0-9]+)$ 转向到 /people/([0-9]+)
用下面的方法搞定。
if ($query_string ~ “growingId=(.*)”) {
set $growingId $1;
rewrite ^/home/index.html.* /people/$growingId/ last;
}