解决mode: 'history'模式下刷新404;
1、打开网站--设置--伪静态:
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.html?s=/$1 last;
break;
}
}
2、 修改nginx配置文件:
location / {
……
try_files $uri $uri/ /index.html; ---解决页面刷新404问题
}
解决mode: 'history'模式下刷新404;
1、打开网站--设置--伪静态:
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.html?s=/$1 last;
break;
}
}
2、 修改nginx配置文件:
location / {
……
try_files $uri $uri/ /index.html; ---解决页面刷新404问题
}