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