fixed homepage
This commit is contained in:
parent
0c96ba6c90
commit
f19f59d53a
@ -23,7 +23,15 @@ class Router {
|
||||
|
||||
private function preparePath() {
|
||||
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||
|
||||
//homepage
|
||||
if ($path === '/') {
|
||||
return $path;
|
||||
}
|
||||
|
||||
// remove empty directory path
|
||||
$path = rtrim($path, '/'); // remove trailing slash
|
||||
|
||||
//remove anything after and including ampersand
|
||||
$path = preg_replace('/&.+$/', '', $path);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user