在NGINX的配置文件中添加以后代码:
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ @router;
index index.html index.htm;
}location @router {
rewrite ^.*$ /index.html last;
}
在NGINX的配置文件中添加以后代码:
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ @router;
index index.html index.htm;
}location @router {
rewrite ^.*$ /index.html last;
}