fix: redirect everything to index.php
This commit is contained in:
parent
63f7ef5eee
commit
928584c92a
@ -21,6 +21,7 @@ class Router
|
||||
{
|
||||
$this->uri = is_countable($_SERVER['REQUEST_URI']) && count($_SERVER['REQUEST_URI']) > 1 ? rtrim($_SERVER['REQUEST_URI'], "/") : $_SERVER['REQUEST_URI'];
|
||||
$this->uri = str_replace($pathname, "", $this->uri);
|
||||
var_dump($this->uri);
|
||||
$this->requestType = $_SERVER['REQUEST_METHOD'];
|
||||
$this->routes = [];
|
||||
$this->middleware = [];
|
||||
|
@ -13,4 +13,8 @@ $app->get("/", function (array $req, Response $res) {
|
||||
$res->send("Hello World");
|
||||
});
|
||||
|
||||
$app->get("/user", function (array $req, Response $res) {
|
||||
$res->send("user");
|
||||
});
|
||||
|
||||
$app->start();
|
Loading…
x
Reference in New Issue
Block a user