[SOLVED]Deploy "dist" on Apache (routing problem)
-
Here is what I did to simulate project deployment
httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot “path/to/quasarproject/dist”
ServerName quasarproject
ServerAlias quasarproject
</VirtualHost>hosts
127.0.0.1 quasarprojectAll is good when I visit http://quasarproject initially, I can navigate through my app without problems. But if I refresh the page or entered a subpath on the browser e.g. http://quasarproject/users, I get Error 404. My guess is that I need .htaccess for this but I’m not sure how.
Regards
-
got it working https://router.vuejs.org/en/essentials/history-mode.html
-
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>This worked for me including www. http redirects to https