18 lines
431 B
PHP
18 lines
431 B
PHP
<?php
|
|
|
|
$path = ltrim(str_replace(Config::getBasePath(), "", $_SERVER['REQUEST_URI']), "/");
|
|
|
|
try {
|
|
if (substr($path, 0, 3) === "api") {
|
|
if (strpos($path, "docs") === false) {
|
|
require_once __DIR__ . "/../$path/index.php";
|
|
} else {
|
|
Headers::redirect("index.html");
|
|
}
|
|
} else {
|
|
require_once __DIR__ . "/../pages/index.html";
|
|
}
|
|
} catch (Exception $e) {
|
|
require_once __DIR__ . "/../pages/500.php";
|
|
}
|