vue2 router problem
我想大声告诉你
我想大声告诉你 2017-06-26 10:56:43
0
2
778


1. I used tomcat to run the packaged project. As soon as I refreshed the browser page, it jumped to 404, but set
mode: 'hash', browse The server will not do this, but the URL is too ugly. Why?
2. My routing project is configured like this:

我想大声告诉你
我想大声告诉你

reply all(2)
Peter_Zhu

When you enter the address in your browser, it is parsed by Tomcat. It finds that there is no matching method or file under the current route of your server, so it naturally returns 404. You need to configure the server so that all routes starting with /PcsBrowser/ point to your Vue entry file.

扔个三星炸死你

To play this mode well, you also need background configuration support
Reference: HTML5 History mode

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template