nginx 判断访问文件或目录不存在rewrite
location ~* ^.+(.*) {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.html;
}
}
/*******************1上****2下**********************/
location / {
try_files $uri $uri/ /index.html;
}
location ~* ^.+(.*) {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.html;
}
}
/*******************1上****2下**********************/
location / {
try_files $uri $uri/ /index.html;
}