mirror of
https://git.hexahost.dev/smueller/HexaHost-Frontend.git
synced 2026-06-02 05:48:43 +00:00
Refactor URL handling and improve navigation: Updated .htaccess for cleaner URL structure by removing .php extensions and redirecting to clean URLs. Modified various pages to use absolute paths for links, enhancing consistency and user experience. Updated error pages and footer links accordingly.
This commit is contained in:
@@ -23,19 +23,26 @@
|
||||
RewriteCond %{HTTP_HOST} ^(www\.)?hexahost\.de$ [NC]
|
||||
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
|
||||
# HTML zu PHP Weiterleitungen
|
||||
# PHP-Endung aus URLs entfernen
|
||||
# Schritt 1: Wenn .php in URL, weiterleiten auf saubere URL (301)
|
||||
RewriteCond %{THE_REQUEST} \s/([^.]+)\.php[\s?] [NC]
|
||||
RewriteCond %{REQUEST_URI} !^/(contact-handler|config/)
|
||||
RewriteRule ^(.+)\.php$ /$1 [R=301,L]
|
||||
|
||||
# Schritt 2: index.php zur Startseite weiterleiten
|
||||
RewriteCond %{THE_REQUEST} \s/index\.php[\s?] [NC]
|
||||
RewriteRule ^index\.php$ / [R=301,L]
|
||||
|
||||
# Schritt 3: Saubere URLs intern auf .php-Dateien umleiten
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^([^\.]+)\.html$ $1.php [L,R=301]
|
||||
RewriteCond %{REQUEST_FILENAME}.php -f
|
||||
RewriteRule ^(.+)$ $1.php [L]
|
||||
|
||||
# Direkte HTML zu PHP Weiterleitungen für bekannte Seiten
|
||||
RewriteRule ^index\.html$ index.php [L,R=301]
|
||||
RewriteRule ^about\.html$ about.php [L,R=301]
|
||||
RewriteRule ^contact\.html$ contact.php [L,R=301]
|
||||
RewriteRule ^vpc\.html$ vpc.php [L,R=301]
|
||||
RewriteRule ^vps\.html$ vps.php [L,R=301]
|
||||
RewriteRule ^webhosting\.html$ webhosting.php [L,R=301]
|
||||
RewriteRule ^mail-gateway\.html$ mail-gateway.php [L,R=301]
|
||||
# HTML zu PHP Weiterleitungen (Legacy-Support)
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^([^\.]+)\.html$ $1 [L,R=301]
|
||||
</IfModule>
|
||||
|
||||
# Konfigurationsdateien schützen
|
||||
|
||||
@@ -21,8 +21,8 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<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>
|
||||
<a href="/" class="btn btn-primary">Zur Startseite</a>
|
||||
<a href="/contact" class="btn btn-secondary">Kontakt aufnehmen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,8 +21,8 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<h1>Interner Serverfehler</h1>
|
||||
<p>Es ist ein unerwarteter Fehler aufgetreten. Wir arbeiten bereits an der Lösung.</p>
|
||||
<div class="error-actions">
|
||||
<a href="index.php" class="btn btn-primary">Zur Startseite</a>
|
||||
<a href="contact.php" class="btn btn-secondary">Support kontaktieren</a>
|
||||
<a href="/" class="btn btn-primary">Zur Startseite</a>
|
||||
<a href="/contact" class="btn btn-secondary">Support kontaktieren</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -233,8 +233,8 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<h2>Bereit für die Zusammenarbeit?</h2>
|
||||
<p>Lassen Sie uns gemeinsam Ihre Hosting-Lösung entwickeln</p>
|
||||
<div class="cta-actions">
|
||||
<a href="contact.php" class="btn btn-primary">Kontakt aufnehmen</a>
|
||||
<a href="vpc.php" class="btn btn-secondary">Produkte entdecken</a>
|
||||
<a href="/contact" class="btn btn-primary">Kontakt aufnehmen</a>
|
||||
<a href="/vpc" class="btn btn-secondary">Produkte entdecken</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -418,7 +418,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
</p>
|
||||
<p>
|
||||
(2) Einzelheiten zur Datenverarbeitung sind in der
|
||||
<a href="datenschutz.php">Datenschutzerklärung</a> geregelt.
|
||||
<a href="/datenschutz">Datenschutzerklärung</a> geregelt.
|
||||
</p>
|
||||
<p>
|
||||
(3) Sofern der Kunde personenbezogene Daten Dritter auf den gemieteten
|
||||
|
||||
@@ -147,7 +147,7 @@ includeHeader($page_title, $page_description, $current_page, $additional_scripts
|
||||
<div class="form-group checkbox-group">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox" id="privacy" name="privacy" required>
|
||||
Ich habe die <a href="datenschutz.php" target="_blank">Datenschutzerklärung</a> gelesen und stimme der Verarbeitung meiner Daten zu. *
|
||||
Ich habe die <a href="/datenschutz" target="_blank">Datenschutzerklärung</a> gelesen und stimme der Verarbeitung meiner Daten zu. *
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
<div class="footer-section">
|
||||
<h4>Produkte</h4>
|
||||
<ul>
|
||||
<li><a href="vpc.php">Virtual Private Container</a></li>
|
||||
<li><a href="vps.php">Virtual Private Server</a></li>
|
||||
<li><a href="mail-gateway.php">Mail Gateway</a></li>
|
||||
<li><a href="webhosting.php">Webhosting</a></li>
|
||||
<li><a href="/vpc">Virtual Private Container</a></li>
|
||||
<li><a href="/vps">Virtual Private Server</a></li>
|
||||
<li><a href="/mail-gateway">Mail Gateway</a></li>
|
||||
<li><a href="/webhosting">Webhosting</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-section">
|
||||
<h4>Unternehmen</h4>
|
||||
<ul>
|
||||
<li><a href="about.php">Über uns</a></li>
|
||||
<li><a href="contact.php">Kontakt</a></li>
|
||||
<li><a href="impressum.php">Impressum</a></li>
|
||||
<li><a href="datenschutz.php">Datenschutz</a></li>
|
||||
<li><a href="agb.php">AGB</a></li>
|
||||
<li><a href="/about">Über uns</a></li>
|
||||
<li><a href="/contact">Kontakt</a></li>
|
||||
<li><a href="/impressum">Impressum</a></li>
|
||||
<li><a href="/datenschutz">Datenschutz</a></li>
|
||||
<li><a href="/agb">AGB</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-section">
|
||||
|
||||
@@ -16,23 +16,23 @@
|
||||
<nav class="nav">
|
||||
<div class="nav-container">
|
||||
<div class="nav-logo">
|
||||
<a href="index.php">
|
||||
<a href="/">
|
||||
<img src="https://cdn.hexahost.de/assets/img/logo/8iFs123BynHQWHI5.png" alt="HexaHost.de Logo" class="logo-image">
|
||||
</a>
|
||||
</div>
|
||||
<ul class="nav-menu">
|
||||
<li><a href="index.php" class="nav-link <?php echo ($current_page === 'home') ? 'active' : ''; ?>">Home</a></li>
|
||||
<li><a href="/" class="nav-link <?php echo ($current_page === 'home') ? 'active' : ''; ?>">Home</a></li>
|
||||
<li class="nav-dropdown">
|
||||
<a href="#" class="nav-link <?php echo (in_array($current_page, ['vpc', 'vps', 'mail-gateway', 'webhosting'])) ? 'active' : ''; ?>">Produkte</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="vpc.php" class="<?php echo ($current_page === 'vpc') ? 'active' : ''; ?>">Virtual Private Container</a></li>
|
||||
<li><a href="vps.php" class="<?php echo ($current_page === 'vps') ? 'active' : ''; ?>">Virtual Private Server</a></li>
|
||||
<li><a href="mail-gateway.php" class="<?php echo ($current_page === 'mail-gateway') ? 'active' : ''; ?>">Mail Gateway</a></li>
|
||||
<li><a href="webhosting.php" class="<?php echo ($current_page === 'webhosting') ? 'active' : ''; ?>">Webhosting</a></li>
|
||||
<li><a href="/vpc" class="<?php echo ($current_page === 'vpc') ? 'active' : ''; ?>">Virtual Private Container</a></li>
|
||||
<li><a href="/vps" class="<?php echo ($current_page === 'vps') ? 'active' : ''; ?>">Virtual Private Server</a></li>
|
||||
<li><a href="/mail-gateway" class="<?php echo ($current_page === 'mail-gateway') ? 'active' : ''; ?>">Mail Gateway</a></li>
|
||||
<li><a href="/webhosting" class="<?php echo ($current_page === 'webhosting') ? 'active' : ''; ?>">Webhosting</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="about.php" class="nav-link <?php echo ($current_page === 'about') ? 'active' : ''; ?>">Über uns</a></li>
|
||||
<li><a href="contact.php" class="nav-link <?php echo ($current_page === 'contact') ? 'active' : ''; ?>">Kontakt</a></li>
|
||||
<li><a href="/about" class="nav-link <?php echo ($current_page === 'about') ? 'active' : ''; ?>">Über uns</a></li>
|
||||
<li><a href="/contact" class="nav-link <?php echo ($current_page === 'contact') ? 'active' : ''; ?>">Kontakt</a></li>
|
||||
</ul>
|
||||
<div class="nav-toggle">
|
||||
<span></span>
|
||||
|
||||
@@ -25,7 +25,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
</p>
|
||||
<div class="hero-actions">
|
||||
<a href="#products" class="btn btn-primary">Produkte entdecken</a>
|
||||
<a href="contact.php" class="btn btn-secondary">Kontakt aufnehmen</a>
|
||||
<a href="/contact" class="btn btn-secondary">Kontakt aufnehmen</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-visual">
|
||||
@@ -72,7 +72,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<li>DDoS Protection</li>
|
||||
<li>99.9% Uptime</li>
|
||||
</ul>
|
||||
<a href="vpc.php" class="btn btn-primary">Mehr erfahren</a>
|
||||
<a href="/vpc" class="btn btn-primary">Mehr erfahren</a>
|
||||
</div>
|
||||
<div class="product-card glass-card">
|
||||
<div class="product-icon">
|
||||
@@ -90,7 +90,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<li>Backup-Service</li>
|
||||
<li>24/7 Monitoring</li>
|
||||
</ul>
|
||||
<a href="vps.php" class="btn btn-primary">Mehr erfahren</a>
|
||||
<a href="/vps" class="btn btn-primary">Mehr erfahren</a>
|
||||
</div>
|
||||
<div class="product-card glass-card">
|
||||
<div class="product-icon">
|
||||
@@ -107,7 +107,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<li>Webmail Interface</li>
|
||||
<li>Mobile Sync</li>
|
||||
</ul>
|
||||
<a href="mail-gateway.php" class="btn btn-primary">Mehr erfahren</a>
|
||||
<a href="/mail-gateway" class="btn btn-primary">Mehr erfahren</a>
|
||||
</div>
|
||||
<div class="product-card glass-card">
|
||||
<div class="product-icon">
|
||||
@@ -127,7 +127,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<li>Automatische Backups</li>
|
||||
<li>PHP & MySQL</li>
|
||||
</ul>
|
||||
<a href="webhosting.php" class="btn btn-primary">Mehr erfahren</a>
|
||||
<a href="/webhosting" class="btn btn-primary">Mehr erfahren</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -196,8 +196,8 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<h2>Bereit für zuverlässiges Hosting?</h2>
|
||||
<p>Starten Sie noch heute mit HexaHost und erleben Sie den Unterschied</p>
|
||||
<div class="cta-actions">
|
||||
<a href="contact.php" class="btn btn-primary">Jetzt starten</a>
|
||||
<a href="about.php" class="btn btn-secondary">Mehr über uns</a>
|
||||
<a href="/contact" class="btn btn-primary">Jetzt starten</a>
|
||||
<a href="/about" class="btn btn-secondary">Mehr über uns</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -320,7 +320,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<p>Starten Sie noch heute mit unserem Mail Gateway</p>
|
||||
<div class="cta-actions">
|
||||
<a href="contact.php?product=mail-gateway" class="btn btn-primary">Jetzt bestellen</a>
|
||||
<a href="contact.php" class="btn btn-secondary">Beratung anfordern</a>
|
||||
<a href="/contact" class="btn btn-secondary">Beratung anfordern</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -333,7 +333,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<p>Starten Sie noch heute mit einem Virtual Private Container</p>
|
||||
<div class="cta-actions">
|
||||
<a href="contact.php?product=vpc" class="btn btn-primary">Jetzt bestellen</a>
|
||||
<a href="contact.php" class="btn btn-secondary">Beratung anfordern</a>
|
||||
<a href="/contact" class="btn btn-secondary">Beratung anfordern</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -337,7 +337,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<p>Starten Sie noch heute mit einem Virtual Private Server</p>
|
||||
<div class="cta-actions">
|
||||
<a href="contact.php?product=vps" class="btn btn-primary">Jetzt bestellen</a>
|
||||
<a href="contact.php" class="btn btn-secondary">Beratung anfordern</a>
|
||||
<a href="/contact" class="btn btn-secondary">Beratung anfordern</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -336,7 +336,7 @@ includeHeader($page_title, $page_description, $current_page);
|
||||
<p>Starten Sie noch heute mit professionellem Webhosting</p>
|
||||
<div class="cta-actions">
|
||||
<a href="contact.php?product=webhosting" class="btn btn-primary">Jetzt bestellen</a>
|
||||
<a href="contact.php" class="btn btn-secondary">Beratung anfordern</a>
|
||||
<a href="/contact" class="btn btn-secondary">Beratung anfordern</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user