简体   繁体   中英

is there an way to run towice vue apps in one index.html First vue Version is 3 and second vue app version is 2

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

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM