# Slim4 route with same folder name not working

**URL:** <https://discourse.slimframework.com/t/slim4-route-with-same-folder-name-not-working/6044>\
**Category:** Questions\
**Created:** [February 10, 2025, 9:15am UTC](https://discourse.slimframework.com/t/slim4-route-with-same-folder-name-not-working/6044 "2025-02-10T09:15:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandoonian](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@dandoonian](https://discourse.slimframework.com/u/dandoonian)\
**Post date:** [February 10, 2025, 9:15am UTC](https://discourse.slimframework.com/t/slim4-route-with-same-folder-name-not-working/6044/1 "2025-02-10T09:15:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [February 12, 2025, 6:26pm UTC](https://discourse.slimframework.com/t/slim4-route-with-same-folder-name-not-working/6044/2 "2025-02-12T18:26:23Z")

</div>

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