修改Nginx配置文件,在里面加上这两段,/h5为vue项目打包文件名
location /h5 {
try_files $uri $uri/ @router;
index index.html index.htm;
}
location @router {
rewrite ^.*$ /h5/index.html last;
}
修改Nginx配置文件,在里面加上这两段,/h5为vue项目打包文件名
location /h5 {
try_files $uri $uri/ @router;
index index.html index.htm;
}
location @router {
rewrite ^.*$ /h5/index.html last;
}