Enhance security and configuration of contact form: Added Content Security Policy and Strict-Transport-Security headers in .htaccess for improved security. Updated error handling to use a single 404.php for various error codes. Removed deprecated config.php and composer.json files, and implemented IP address detection for better security. Added honeypot field for bot protection in contact form and improved session security settings in functions.php.

This commit is contained in:
TheOnlyMace
2026-01-13 23:04:05 +01:00
parent a1b303edde
commit 2df47dc461
14 changed files with 233 additions and 12 deletions

73
public/404.php Normal file
View File

@@ -0,0 +1,73 @@
<?php
require_once 'includes/functions.php';
// Page configuration
$page_title = '404 - Seite nicht gefunden | HexaHost.de';
$page_description = 'Die angeforderte Seite wurde nicht gefunden.';
$current_page = '404';
// Set 404 header
http_response_code(404);
// Include header
includeHeader($page_title, $page_description, $current_page);
?>
<main>
<section class="error-page">
<div class="container">
<div class="error-content glass-card">
<div class="error-code">404</div>
<h1>Seite nicht gefunden</h1>
<p>Die angeforderte Seite existiert leider nicht oder wurde verschoben.</p>
<div class="error-actions">
<a href="index.php" class="btn btn-primary">Zur Startseite</a>
<a href="contact.php" class="btn btn-secondary">Kontakt aufnehmen</a>
</div>
</div>
</div>
</section>
</main>
<style>
.error-page {
min-height: 60vh;
display: flex;
align-items: center;
justify-content: center;
padding: 4rem 0;
}
.error-content {
text-align: center;
padding: 3rem;
max-width: 500px;
}
.error-code {
font-size: 6rem;
font-weight: 700;
background: linear-gradient(135deg, #ff51f9, #a348ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
line-height: 1;
margin-bottom: 1rem;
}
.error-content h1 {
font-size: 1.75rem;
margin-bottom: 1rem;
}
.error-content p {
color: #888;
margin-bottom: 2rem;
}
.error-actions {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
}
</style>
<?php
includeFooter();
?>