<?php
/**
 * Root front controller.
 * Keep the original request URI so Nginx/Apache rewrite to /index.php
 * can still be resolved by public/index.php.
 */

define('ROOT_PATH', __DIR__ . '/');

$hasInstallConfig = is_file(ROOT_PATH . 'data/config.php') || is_file(ROOT_PATH . 'core/db/config.php');

if (!$hasInstallConfig) {
    header('Location: /install/index.php');
    exit;
}

require ROOT_PATH . 'public/index.php';
