I just finished the installation guide of setting up a php slim app. Everything is working fine except when the user specifies an url that doesn't exist in the app, he is not getting redirected to the index.php.
I think it has something to do with the index.php located in the public directory instead of the project root directory.
My file structure looks as follows:
-public
----.htaccess
----index.php
-src
-vendor
----composer
----fig
----nikic
----psr
----ralouphie
----slim
And my .htaccess file contains the following:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
Allow from all
By the way when I specify a non existing route I get a Slim\Exception\HttpNotFoundException exeption. Which makes sense since the route does not exist. But it should redirect to the index.php