有很多路线,但是当出现404 Not Found的重新加载页面时,只有Route Couriers会出现问题。 我已遵循使用模式的准则:“历史记录”并替换.htaccess。 但仍然失败
这是路由器文件
`
Vue.use(Router)
const router = new Router({
mode: 'history',
routes: [
{
path: '/outlets',
component: IndexOutlet
},
{
path: '/couriers',
component: IndexCourier
}
]
})
`
这是.htaccess文件
`
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteBase /app/dist
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</ifModule>
`