Hi i want to use the package called Alto Router in wamp.
in www root i changed the index page with
<?php
require( __DIR__ . "/vendor/autoload.php");
$router = new AltoRouter();
$router->map('GET','/',function(){
include(__DIR__ . "/project/home.php");
});
$router->map('GET','/page1',function(){
include(__DIR__ . "/project/page1.php");
});
$match = $router->match();
if($match && is_callable($match['target'])){
call_user_func_array($match['target'],$match['params']);
}
else{
//no route found
header($_SERVER['SERVER_PROTOCOL'].'404 Not Found');
}
Redirection of home page is Ok But if i type localhost/page1 it redirects to 404 error page.. I think this is because of the default wamp server settings etc.. İs there anyway to change it?