<?php
require_once __DIR__ . '/bootstrap.php';
if (preg_match('#/index\.php$#', wp_request_path())) {
app_redirect('', 301);
}
// Root URL should be the main dashboard.
// If not logged in, send to login.
if (!isLoggedIn()) {
app_redirect('login');
}
// Render the dashboard without changing the URL.
require __DIR__ . '/pages/dashboard.php';