0

I am using vue cli version 2.9.6. I want to deploy to sub directory on shared hosting.

I was followed instruction from http://www.matjazev.net/blog/2018/03/01/using-vue-spa-created-with-webpack-in-subfolder/ and it work fine when using hash mode routes.

But if using history, there is a problem. The problem is when I access http://example.com/subdirectory/user for example, there is an error "The requested URL was not found on this server.".

But if I access http://example.com/subdirectory it works.

What is the problem?

Thanks in advance. Sorry my english is very poor.

Jim Gilmartin
  • 783
  • 6
  • 13
  • 1
    Possible duplicate of [Vue Router return 404 when revisit to the url](https://stackoverflow.com/questions/36399319/vue-router-return-404-when-revisit-to-the-url) – Phil Oct 30 '19 at 01:56
  • You need to perform additional server configuration as documented on this article. https://router.vuejs.org/guide/essentials/history-mode.html – Angelo Oct 30 '19 at 04:17

0 Answers0