2👍
You need to config your server because, you are resolving the routes with the server, and not with vue (When you click on the navbar and go to /about, you can access, because you are resolving the route with vue).
0👍
Uou are using Vue router’s history mode. For any page URL to work for vue in this case you will have to make some changes in your web server’s configuration. Here are 2 of the most common config settings. Make these changes, restart your web server and your issue will be resolved.
Apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
nginx
location / {
try_files $uri $uri/ /index.html;
}
Full documentation available at https://router.vuejs.org/guide/essentials/history-mode.html.
Source:stackexchange.com