Issue
I created two apps with vue framework, and i want to combine them together in one directory to be like this:
https://host.com/ => runs first vue app EX: Website Store.
https://host.com/admin => runs second vue app EX: Dashboard of the website.
can i find any way to do this ??
i tried to put dashboard build in ./admin/index.html and wbsite in ./index.html
but when i run it website works well but the admin path giving me Error 404 he can’t find some chuncks
Solution
you should change your .htaccess file in your subdirectory so be able to run vue app on it. I don’t think vuejs version matter !
if your subdirectory is admin you should use this config (in yourdomain.com/admin/.htaccess file) :
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . admin/index.html [L]
</ifModule>
Answered By – ghazyy
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0