fix
This commit is contained in:
parent
68fcaa6540
commit
0b7a8c0252
@ -21,9 +21,16 @@ function getEndpoint($endpoint_name): string
|
|||||||
$endpoint_name = $routerRequest["page_name"];
|
$endpoint_name = $routerRequest["page_name"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$endpoint_file = $routerConfig["endpoint_dir"] . $routerRequest["subdomain"] . "/" . $endpoint_name . ".php";
|
if($routerRequest["isToApex"]){
|
||||||
|
$subdomain_part = "";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$subdomain_part = $routerRequest["subdomain"] . "/";
|
||||||
|
}
|
||||||
|
|
||||||
$endpoint_file_global = $routerConfig["endpoint_dir"] . "home/" . $endpoint_name . ".php";
|
$endpoint_file = $routerConfig["endpoint_dir"] . $subdomain_part . $endpoint_name . ".php";
|
||||||
|
|
||||||
|
$endpoint_file_global = $routerConfig["endpoint_dir"] . "global/" . $endpoint_name . ".php";
|
||||||
|
|
||||||
if (file_exists($endpoint_file_global)){
|
if (file_exists($endpoint_file_global)){
|
||||||
$output = runEndpoint($endpoint_file_global);
|
$output = runEndpoint($endpoint_file_global);
|
||||||
|
@ -15,6 +15,7 @@ function initRouter(): bool
|
|||||||
$routerRequest["subdomain"] = $routerConfig["default_site"];
|
$routerRequest["subdomain"] = $routerConfig["default_site"];
|
||||||
$routerRequest["domain"] = basename($routerRequest["requestAddress"][0]);
|
$routerRequest["domain"] = basename($routerRequest["requestAddress"][0]);
|
||||||
$routerRequest["tld"] = basename($routerRequest["requestAddress"][1]);
|
$routerRequest["tld"] = basename($routerRequest["requestAddress"][1]);
|
||||||
|
$routerRequest["isToApex"] = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user