0👍
You are probably looking towards this https://router.vuejs.org/en/essentials/history-mode.html.
Depending on your server’s configuration, you should follow the steps in that web page.
I will copy apache
and nginx
ones since they are widely used.
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;
}
Source:stackexchange.com