【发布时间】:2018-06-01 11:21:21
【问题描述】:
我在 apache 服务器上托管我的 vuejs 项目。
- 初始化项目
- 设置路由器
- 构建并托管到 apache 服务器
const router = new VueRouter({
routes: Routes,
// relative: true,
mode: 'history'
});
这在本地运行良好,但 vue 路由器在服务器上中断。 示例
如果我运行 http://example.com 并转到 http://exmaple.com/sub 效果很好
但是如果我刷新页面会抛出 404 错误。
【问题讨论】:
标签: apache vue.js vuejs2 vue-router