I'm new to vue and I'm having an issue with vue router. I'm using Vue CLI 3. History mode is working perfectly on a local server but in production mode it shows a 404 when refreshing
I know this is a common issue, so I followed the documentation of Vue Router. So I put this piece of code in a .htaccess file at the root of the project, but it doesn't seem to work
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
Since I'm a beginner I must miss something, any idea?
Thank you for your help !
RewriteRule . /index.html [L]
. If that is all verified try restarting apache. If still no luck ModRewrite is not installed or allow overrides is not allowed. – Tim Wickstrom