if(!isset($_COOKIE['maintenance']) || empty($_COOKIE['maintenance'])){ require 'maintenance.html'; exit; } require dirname(__DIR__) . '/config/bootstrap.php'; use Cake\Network\Request; use Cake\Network\Response; use Cake\Routing\DispatcherFactory; try { $dispatcher = DispatcherFactory::create(); $dispatcher->dispatch( Request::createFromGlobals(), new Response() ); } catch (\Cake\Routing\Exception\MissingRouteException $e) { header('Location: /404'); }