title: PHP Slim\Exception\HttpNotFoundException 404 Not Found and nothing is helping
body: <p>I'm creating an web app, and I can't move because of Slim 4. It's showing up this error:</p>
  <p><code>Fatal error: Uncaught Slim\Exception\HttpNotFoundException: Not found. in C:\xampp\htdocs\projectfolder\app\vendor\slim\slim\Slim\Middleware\RoutingMiddleware.php:91 Stack trace: #0 C:\xampp\htdocs\projectfolder\app\vendor\slim\slim\Slim\Routing\RouteRunner.php(72): Slim\Middleware\RoutingMiddleware-&gt;performRouting(Object(Slim\Psr7\Request)) #1 C:\xampp\htdocs\projectfolder\app\vendor\slim\slim\Slim\MiddlewareDispatcher.php(81): Slim\Routing\RouteRunner-&gt;handle(Object(Slim\Psr7\Request)) #2 C:\xampp\htdocs\projectfolder\app\vendor\slim\slim\Slim\App.php(215): Slim\MiddlewareDispatcher-&gt;handle(Object(Slim\Psr7\Request)) #3 C:\xampp\htdocs\projectfolder\app\vendor\slim\slim\Slim\App.php(199): Slim\App-&gt;handle(Object(Slim\Psr7\Request)) #4 C:\xampp\htdocs\projectfolder\app\index.php(16): Slim\App-&gt;run() #5 {main} thrown in C:\xampp\htdocs\projectfolder\app\vendor\slim\slim\Slim\Middleware\RoutingMiddleware.php on line 91</code></p>
  <p>I'm using xampp, there is apache server and I thought the problem was there, in <code>.htacces</code> file, but hell no..</p>
  <p><strong>here is how it looks</strong></p>
  <p><a href="https://i.stack.imgur.com/QlK0P.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QlK0P.jpg" alt="error" /></a></p>
  <p>I've been trying to fix this for more than 4-5 hours, I tried everything I found on google, stackoverflow, Slim's Github, YouTube.. nothing is working.</p>
  <p><strong>.htacces</strong></p>
  <pre><code>RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^ index.php [QSL,L]
  </code></pre>
  <p><strong>My directory</strong></p>
  <p><a href="https://i.stack.imgur.com/tKyO9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tKyO9.jpg" alt="folders" /></a></p>
  <p><strong>composer.json</strong></p>
  <p><a href="https://i.stack.imgur.com/Qy0X1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qy0X1.jpg" alt="json" /></a></p>
  <p><strong>index.php</strong> below:</p>
  <pre class="lang-php prettyprint-override"><code>use Psr\Http\Message\ResponseInterface as Response;
  use Psr\Http\Message\ServerRequestInterface as Request;
  use Slim\Factory\AppFactory;
  
  require __DIR__ . '/vendor/autoload.php';
  
  $app = AppFactory::create();
  
  $app-&gt;get('/', function (Request $request, Response $response) {
      $response-&gt;getBody()-&gt;write(&quot;Hello, world!&quot;);
      return $response;
  });
  
  $app-&gt;run();
  </code></pre>
  <p>I do not know what to do anymore, maybe someone can help me and other thousands of people who can't find the answer, or it will be better idea to move and trying another framework..</p>