Answer the question
In order to leave comments, you need to log in
How to make two entry points ( Vue cli + php )?
There is an api in the /api folder and there is a vue app in /public, is it possible to make all requests go to vue (/public/index.html) but if the request goes through /api, then it will go to /api /index.php I dug around the Internet, found a couple of articles, tried it, nothing happens.
Answer the question
In order to leave comments, you need to log in
RewriteEngine On
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
</IfModule>
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} ^/api
RewriteRule ^.*$ api/index.php$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.html
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question