diff --git a/.hta_404.php b/.hta_404.php index cfcf037..c453172 100644 --- a/.hta_404.php +++ b/.hta_404.php @@ -9,7 +9,9 @@ if ($urlParts[1] === 'notice') { $slug = $urlParts[2]; - } else { + } elseif($urlParts[1] === 'departments'){ + $slug = $urlParts[2]; + } else{ $slug = $urlParts[1]; } @@ -21,13 +23,12 @@ $totalPageContent = $headerContent . $pageContent . $footerContent; $filePath = __DIR__ . '/' . $fileName; - // if (file_put_contents($filePath, $totalPageContent)) { - // // echo "
Page saved successfully at $filePath.
"; - // } else { - // // echo "Failed to save the page.
"; - // } + if (file_put_contents($filePath, $totalPageContent)) { + // echo "Page saved successfully at $filePath.
"; + } else { + // echo "Failed to save the page.
"; + } } - try { $conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/.hta_header.php b/.hta_header.php index a4d8635..1c052bc 100644 --- a/.hta_header.php +++ b/.hta_header.php @@ -289,15 +289,29 @@