SEO-Optimierung: Meta-Tags, Open Graph, Schema.org, robots.txt, sitemap.xml, semantisches HTML und Performance-Verbesserungen (.htaccess mit GZIP & Caching)
This commit is contained in:
72
.htaccess
72
.htaccess
@@ -1,3 +1,7 @@
|
||||
# ======================================
|
||||
# SICHERHEIT
|
||||
# ======================================
|
||||
|
||||
# Schutz der Konfigurationsdatei
|
||||
<Files "config.php">
|
||||
Order allow,deny
|
||||
@@ -10,9 +14,73 @@
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
# Optional: Schutz vor Directory Browsing
|
||||
# Schutz vor Directory Browsing
|
||||
Options -Indexes
|
||||
|
||||
# Optional: PHP Fehler nicht anzeigen (für Produktivbetrieb)
|
||||
# PHP Fehler nicht anzeigen (für Produktivbetrieb)
|
||||
php_flag display_errors Off
|
||||
php_flag log_errors On
|
||||
|
||||
# ======================================
|
||||
# SEO & PERFORMANCE
|
||||
# ======================================
|
||||
|
||||
# HTTPS Weiterleitung (aktivieren wenn SSL verfügbar)
|
||||
# RewriteEngine On
|
||||
# RewriteCond %{HTTPS} off
|
||||
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
|
||||
# www zu non-www Weiterleitung (oder umgekehrt)
|
||||
# RewriteEngine On
|
||||
# RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
||||
# RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
|
||||
|
||||
# ======================================
|
||||
# GZIP KOMPRESSION
|
||||
# ======================================
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json application/xml
|
||||
</IfModule>
|
||||
|
||||
# ======================================
|
||||
# BROWSER CACHING
|
||||
# ======================================
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
|
||||
# Bilder
|
||||
ExpiresByType image/jpeg "access plus 1 year"
|
||||
ExpiresByType image/png "access plus 1 year"
|
||||
ExpiresByType image/gif "access plus 1 year"
|
||||
ExpiresByType image/webp "access plus 1 year"
|
||||
ExpiresByType image/svg+xml "access plus 1 year"
|
||||
|
||||
# CSS und JavaScript
|
||||
ExpiresByType text/css "access plus 1 month"
|
||||
ExpiresByType application/javascript "access plus 1 month"
|
||||
ExpiresByType text/javascript "access plus 1 month"
|
||||
|
||||
# Fonts
|
||||
ExpiresByType font/woff "access plus 1 year"
|
||||
ExpiresByType font/woff2 "access plus 1 year"
|
||||
ExpiresByType application/font-woff "access plus 1 year"
|
||||
ExpiresByType application/font-woff2 "access plus 1 year"
|
||||
|
||||
# HTML
|
||||
ExpiresByType text/html "access plus 1 hour"
|
||||
|
||||
# Favicon
|
||||
ExpiresByType image/x-icon "access plus 1 year"
|
||||
</IfModule>
|
||||
|
||||
# ======================================
|
||||
# MIME TYPES
|
||||
# ======================================
|
||||
<IfModule mod_mime.c>
|
||||
AddType application/javascript js
|
||||
AddType text/css css
|
||||
AddType image/svg+xml svg svgz
|
||||
AddType font/woff woff
|
||||
AddType font/woff2 woff2
|
||||
</IfModule>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user