I started today with the PHP Framework Flight. Now I downloaded the "Flight skeleton" from their homepage.
Here is an image of the folder structur:
Here is the that is inside the index.php
file:
<?php
require 'flight/Flight.php';
Flight::route('/', function(){
echo "Hello World";
});
Flight::route('/categorie', function(){
echo "Hello World";
});
Flight::start();
?>
If I start the browser and enter the URL http://localhost/firstflight/
I get "Hello World" displayed. But if I enter http://localhost/firstflight/categorie
I get an error 404 Webpage not found...
displayed. How can I fix this problem?
Here is the code inside the .htaccess
file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]