Slim4 route with same folder name not working

i had a project written in slim3, that i am upgrading to slim4.

i have a route group named app, in which i have tens of routes.
GET app/testserver
GET app/testdata
POST app/senddata

all these routes are not working, because in my public folder i have a folder named app in which i have some public resources (pictures, css)
so my folder hierarchy is:
-public
|—index.php
|—app
-----|—pictures
-----|—css
if i change the route group to app2 then all my routes will work…
but i cannot change this behavior as i have services integrated with my apis that call the apis as /app/testserver and also fetch pictures from /app/pictures

i have tried editing the .htaccess file so that it doesn’t forward requests to app/pictures and app/css to index.php but it doesn’t work…

any hints?

I think you should try to move / rename the folder “app” to “assets” or any other name.

1 Like