# Slim 4 Subfolder Project

**URL:** <https://discourse.slimframework.com/t/slim-4-subfolder-project/3785>\
**Category:** Questions\
**Created:** [January 9, 2020, 11:48am UTC](https://discourse.slimframework.com/t/slim-4-subfolder-project/3785 "2020-01-09T11:48:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elvisreis](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/elvisreis/32/1298_2.png) [@elvisreis](https://discourse.slimframework.com/u/elvisreis)\
**Post date:** [January 9, 2020, 11:48am UTC](https://discourse.slimframework.com/t/slim-4-subfolder-project/3785/1 "2020-01-09T11:48:59Z")

</div>

In slim 3 I was able to put the endpoint into any folder at any level.

For example if I put myself I create a folder “/public/test/xpto” and put the php file and htaccess in that folder slim 3 recognized the route

/router1  
/router2

from this folder where index.php is

now in slim 4 he is recognizing the route this way

/ test/xpto/router1  
/ test/xpto/router2

this using the slim example…

is there any way to change this behavior

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/2X/d/d87a7322e15d3cd3a29aa44255c74ad8fb9c08ad.png)

---

<div class="post-metadata">

**Author:** ![Mikalay](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/mikalay/32/720_2.png) [@Mikalay](https://discourse.slimframework.com/u/Mikalay)\
**Post date:** [January 9, 2020, 3:16pm UTC](https://discourse.slimframework.com/t/slim-4-subfolder-project/3785/2 "2020-01-09T15:16:42Z")

</div>

Maybe this ?  
[Running Slim 4 in a subdirectory](https://akrabat.com/running-slim-4-in-a-subdirectory/)
