My server has a frontend and a backend like this:
·
|__www
|__frontend
|__public
|__backend
|__public
And I would like to make all my routes point to the frontend except anything that has /api prefix.
For example:
domain.com/foo points to the frontend
domain.com/api/foo points to the backend
I've tried with apache vhost and also with .htaccess
RewriteEngine On
RewriteRule ^api(/.*)?$ /backend/public$1 [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond ^ /frontend/public [L]
How can I make it work?