[Vuejs]-How to include folder name in vue router path

0👍

You need to configure the mod_rewrite module on Apache.

One simple way is to create an .htaccess file in the folder you deployed, with the following content:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>

That example file comes straight from vue-router official docs page.

Leave a comment