I have backend (Symfony) and frontend (React.js).
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?(api/.*)$ public/index.php?/$1 [L,QSA,PT]
RewriteRule ^$ /fe/build/ [L]
I neeed forward requests beginning by /api to public/index.php. It's working.
Problem is with frontend. I need other requests forward to fe/build folder where index.html with all assets.
Now I get content of fe/build/index.html but I have problem with loading assets.
In console I have following error:
static/js/main.97d34693.js NOT FOUND
I think that static/js/main.97d34693.js is loading from root folder and not from fe/build folder. Somebody know what am I doing bad?