public static function ProcessURL() { // Check the host the request was made to, and redirect if necessary. self::checkHost(); // Check the HTTPS status, redirect if necessary. self::checkHTTPS(); $page_info_key = self::getPageArrayKey(); if ($page_info_key === false) { self::send404Headers(); self::$to_show = self::$FILE_NOT_FOUND; return "404"; } else { $page_array = self::$PAGE_INFO[$page_info_key]; self::checkRedirectRequest($page_array); self::ensureHTMOrSlashExtension($page_array, $page_info_key); self::$to_show = $page_array; return $page_info_key; } }
} #powered { text-align: center; padding: 20px; } </style> </head> <body> <h1>Defuse.ca's HelloWorld! "CMS"</h1> <div id="navbar"> <a href="/">Home</a> <a href="/about.htm">About</a> <a href="/skadlfjasdklfjsdklaf">404 page</a> </div> <div id="pagecontent"> <?php URLParse::IncludePageContents(); ?> </div> <div id="powered"> Powered by <a href="https://defuse.ca/helloworld-cms.htm"> Defuse.ca's HelloWorld! CMS </a> </div> </body> </html>