Apache .htaccess Generator

100% Client-seitig & DSGVO-konform

Rewrite-Regeln für HTTPS-Erzwingung, WWW-Kanonisierung und Caching

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.

Erweiterung holen

So erstellen Sie .htaccess-Dateien

  1. 1Wählen Sie Weiterleitungs- und Sicherheitsoptionen.
  2. 2Legen Sie die WWW-Kanonisierungsstrategie fest.
  3. 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