T
T
Timur Evgazhukov2018-05-23 13:46:44
Nginx
Timur Evgazhukov, 2018-05-23 13:46:44

How to set up correct path handling for a one-page site?

I decided to develop a site on vue, where all links are processed by the router on the ui side, and the data is received via sockets with nodejs. Everything works well and the user follows the links normally, but if he presses F5 not on the root page, then the message "Cannot GET ..." is displayed. As I understand it, you need to configure it on the server side so that any requests for any links would be interpreted as if they were requesting a root link. How to do this using nodejs, or maybe you need to put it higher, for example, nginx, which will route all requests?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2018-05-23
@evgajukov

https://router.vuejs.org/en/essentials/history-mod...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question