需求
www.xxxx.com/xxx.html 变为 www.xxxx.com/aaa/xxx.html 纯静态 nginx路由重写
实现
#xxx 为想添加的路由
location / {
# Redirect everything that isn't a real file to index.php单文件入口
rewrite ^/(.*)$ https://$host/xxx/index.html? last;
}
location /view {
rewrite /view(.*) /xxx$1 break;
}