vue : 启用 History 模式
var router = new VueRouter({ mode: 'history',//改为history模式,去除url里的# routes })
1. Firebase 支持重新配置
firebase.json 文件
{
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
2.Nginx
nginx.conf 文件
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}