Routing- & Sicherheits-Direktiven
.htaccess-Konfiguration
# ========================================================
# Apache .htaccess Configuration
# Generated by MiniToolDesk (100% Client-Side)
# ========================================================
RewriteEngine On
# Force HTTPS Redirection
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [L,R=301]
# Disable Directory Browsing
Options -Indexes
# Custom 404 Error Page
ErrorDocument 404 /404.html
# Enable Gzip / Brotli Compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
</IfModule>
# Leverage Browser Caching (Expires Headers)
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
</IfModule>
Heften Sie dieses Tool an Ihre Browser-Seitenleiste
Jederzeit per Alt+M aufrufen, ohne den Tab zu wechseln. 100% offline und kostenlos.
So erstellen Sie .htaccess-Dateien
- 1Wählen Sie Weiterleitungs- und Sicherheitsoptionen.
- 2Legen Sie die WWW-Kanonisierungsstrategie fest.
- 3Kopieren oder laden Sie die .htaccess-Datei in das Web-Stammverzeichnis.
Apache Web-Routing
Standard-mod_rewrite-Syntax für VPS und Shared Hosting.
Häufig gestellte Fragen (FAQ)
Gefällt Ihnen Apache .htaccess Generator?Teilen Sie dieses private, werbefreie Tool mit Ihren Entwickler-Kollegen!
MiniToolDesk ist zu 100% kostenlos und client-seitig. Ihre Unterstützung hilft uns.
Verwandte Entwickler-Tools
Popular
Docker Run zu Compose Konverter
Wandeln Sie docker run Befehle in produktionsreife docker-compose.yml Dateien um
Launch tool→
Popular
Nginx Konfigurations-Generator
Visueller Generator für produktionsreife Nginx Reverse-Proxy, SSL & SPA Konfigurationen
Launch tool→
Popular
Dockerfile Multi-Stage Generator
Visueller Builder für minimale, gehärtete Multi-Stage Dockerfiles
Launch tool→
Popular
Kubernetes YAML Manifest Generator
Visueller Generator für Deployment, Service, Ingress und ConfigMap
Launch tool→