forked from Adleraci/adlerka.top
exit on redirect
This commit is contained in:
parent
033ab0cffd
commit
b3b855d505
@ -43,7 +43,6 @@ function getPage($page_name = null): array|false|string
|
||||
|
||||
$dynamic_page_file = $routerConfig["page_dir"] . $routerRequest["subdomain"] . "/" . $page_name . ".php";
|
||||
$page_file = $routerConfig["page_dir"] . $routerRequest["subdomain"] . "/" . $page_name . ".html";
|
||||
echo $page_file;
|
||||
|
||||
$skeleton = file_get_contents($routerConfig["template_dir"] . "skeleton.html");
|
||||
$nav = file_get_contents($routerConfig["template_dir"] . "nav.html");
|
||||
|
@ -51,7 +51,6 @@ function initRouter(): bool
|
||||
$routerRequest["page_name"];
|
||||
// Redirect with default page name
|
||||
header("Location: $redirectAddress");
|
||||
exit();
|
||||
}
|
||||
else{
|
||||
if($_SERVER["REQUEST_METHOD"] == "POST"){
|
||||
@ -61,7 +60,7 @@ function initRouter(): bool
|
||||
$routerRequest["type"] = "page";
|
||||
}
|
||||
}
|
||||
|
||||
echo $needsRedirect;
|
||||
return !$needsRedirect;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user