開發是用vue-cli
為了不讓url出現#,所以router設定為html5 history模式
例如連結為 test.com/user,載入名為user的component
在本機時如果直接直接存取test.com/user是沒問題的
但上傳至網路時,直接存取test.com/user就會返回404
https://router.vuejs.org/zh-cn/essentials/history-mode.html
文章內有提到history需要搭配後端配置
但看起來好像只是把404導成首頁或其他指定頁面
有沒有方法是當直接存取test.com/user時就載入user這個component呢?