Vue路由history模式踩坑记录:nginx配置解决404问

2020-10-20  本文已影响0人  proud2008
const router = new VueRouter({
  mode: "history", //复制地址会提示空白页
  routes
})

复制地址粘贴会出现以下页面

image.png
解决方案 https://www.cnblogs.com/goloving/p/9170508.html
nginx
location / {
  root   D:\Test\exprice\dist;
  index  index.html index.htm;
  try_files $uri $uri/ /index.html; //添加的
}
上一篇 下一篇

猜你喜欢

热点阅读