版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/p930318/article/details/86476103
或者用# 模式的路由,或者修改nginx 里的配置
nginx.conf
location / {
root html;
index index.html index.htm;
try_files $uri $uri/ @router;
}
location @router {
rewrite ^.*$ /index.html last;
}