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:
天蓬老师2017-06-26 10:58:43
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.
扔个三星炸死你2017-06-26 10:58:43
To play this mode well, you also need background configuration support
Reference: HTML5 History mode