域名例如:www.hh.com/test/
1、const router = new VueRouter({
mode: "history",
base: test,
});
2、vue.config中
publicPath: test
3、nginx:
location / {
alias /root_path/
index index.html index.htm;
try_files $uri $uri/ @router;
}
location @router{
rewrite ^(.+)$ test/index.html last;
}
网友评论