# The requested URL was not found on the server

**URL:** <https://discourse.slimframework.com/t/the-requested-url-was-not-found-on-the-server/1487>\
**Category:** Questions\
**Created:** [May 12, 2017, 2:16pm UTC](https://discourse.slimframework.com/t/the-requested-url-was-not-found-on-the-server/1487 "2017-05-12T14:16:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brijeshgajera1234](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brijeshgajera1234](https://discourse.slimframework.com/u/brijeshgajera1234)\
**Post date:** [May 12, 2017, 2:16pm UTC](https://discourse.slimframework.com/t/the-requested-url-was-not-found-on-the-server/1487/1 "2017-05-12T14:16:28Z")

</div>

I have installed Slim3 in linux machine using composer.  
i have created index.php file. ![](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/a9e22323634e704b57e16d1285c4ccb3844f5097.JPG)

Now if i will try to access root dir it will give me “Welcome back” message but if i will try to access “/profile/Name” it is throwing “Not Found” error in the browser. ![](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/57051fdbfea19e664f15d0263bf2d71d3446a20e.JPG)

 ![](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/cb2f5823e2aff565fb659058cf886f387e5d023c.JPG)

**This is my .htaccess file**  
 ![](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/00371df0e95af6e08b94cbf7ee9209dbe7c31bdd.JPG)

---

<div class="post-metadata">

**Author:** ![llvdl](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/llvdl/32/78_2.png) [@llvdl](https://discourse.slimframework.com/u/llvdl)\
**Post date:** [May 12, 2017, 6:50pm UTC](https://discourse.slimframework.com/t/the-requested-url-was-not-found-on-the-server/1487/2 "2017-05-12T18:50:11Z")

</div>

Have you checked if the `AllowOverride` option is set and the `.htaccess` file is used by Apache?

---

<div class="post-metadata">

**Author:** ![brijeshgajera1234](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brijeshgajera1234](https://discourse.slimframework.com/u/brijeshgajera1234)\
**Post date:** [May 15, 2017, 5:46am UTC](https://discourse.slimframework.com/t/the-requested-url-was-not-found-on-the-server/1487/3 "2017-05-15T05:46:52Z")

</div>

Yes i have added that in httpd.config  
This is my code and i am sure my apache server is using .htacces file of my folder because if i will give root dir of project in URL then it is working but whenever i am giving some arguments like “profile/brijesh” then only it is throwing Not Found.  
 ![](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/a1216778f9be59c255a14534c7a0274265c28572.JPG)

---

<div class="post-metadata">

**Author:** ![damianopetrungaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/damianopetrungaro/32/236_2.png) [@damianopetrungaro](https://discourse.slimframework.com/u/damianopetrungaro)\
**Post date:** [May 15, 2017, 11:37am UTC](https://discourse.slimframework.com/t/the-requested-url-was-not-found-on-the-server/1487/4 "2017-05-15T11:37:05Z")

</div>

> [@brijeshgajera1234](#):
>
> This is my code and i am sure my apache server is using .htacces file of my folder because if i will give root dir of project in URL then it is working but whenever i am giving some arguments like “profile/brijesh” then only it is throwing Not Found.

Try with this in the .htaccess:  
RewriteEngine On  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteCond %{REQUEST\_FILENAME} !-d  
RewriteRule ^ index.php [QSA,L]

---

<div class="post-metadata">

**Author:** ![llvdl](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/llvdl/32/78_2.png) [@llvdl](https://discourse.slimframework.com/u/llvdl)\
**Post date:** [May 15, 2017, 6:46pm UTC](https://discourse.slimframework.com/t/the-requested-url-was-not-found-on-the-server/1487/5 "2017-05-15T18:46:01Z")

</div>

The default page not found page delivered by Slim looks different from the page you are getting:

 ![](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/ef86e6b3c5111e327fd3c97ec294759ea3c8a98e.png)

You can check if `index.php` is called by replacing the contents of `index.php` with something simple, e.g.:

```auto
<p>index.php is called.</p>

```
