nginx if判断并 rewrite重写 如果我们需要通过正则匹配地址段重写到对应的地址,写法如下: if ( $request_uri ~* /yueke-lsq/static ) { rewrite ^/(yueke-lsq)/(.*)$ /$2 last; }