Slim Framework always return 404 Error-open source projects slimphp/Slim

These days i’m using Slim Framework as my simplest tool to develop the php web api. Using these two articles:

I follow some of the steps from there. Downloading the Slim Framework, putting the correct directory & files. Adjusting the initation statements such as;

//1. Require Slim
require('Slim/Slim.php');

//2. Instantiate Slim
$app = new Slim();

//3. Define routes
$app->get('/books', function ($id) {
    //Show book with id = $id
});

And then, I modify the rest accordingly.

Such as my checklist that already done:

  • LoadModule rewrite_module modules/mod_rewrite.so -> enabled
  • Slim .htaccess:

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ bootstrap.php [QSA,L]

  • httpd.conf: (Shared Link).

But, after Once I run this statement;

$app->run();

And I run it on my browser…. then, I got 404 Error while testing it on my Localhost. What’s the solution for fixing that?

FYI, here is my simplest PHP file that i’m currently using it. (shared Link)