nginx 判断访问文件或目录不存在rewrite

location ~* ^.+(.*) {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.html;
}
}

 

 

/*******************1上****2下**********************/

 

location / {
try_files $uri $uri/ /index.html;
}

posted @ 2021-06-07 10:26  mrt_yy  阅读(788)  评论(0编辑  收藏  举报