vue项目发布后,线上运行时刷新404
修改nginx配置文件
location / {
root ...
index ...
try_files $uri $uri/ /index.html; ---解决页面刷新404问题
}
(参考官网 https://router.vuejs.org/zh-cn/essentials/history-mode.html)
修改nginx配置文件
location / {
root ...
index ...
try_files $uri $uri/ /index.html; ---解决页面刷新404问题
}
(参考官网 https://router.vuejs.org/zh-cn/essentials/history-mode.html)