MiniToolDesk Logo
MiniToolDesk

Generador de Archivos Apache .htaccess

100% en el Navegador • Cero Envíos

Reglas de reescritura para HTTPS, canonicalización WWW y caché web

Directivas de Enrutamiento y Seguridad

Salida .htaccess
# ========================================================
# 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>

Fija esta herramienta en el panel lateral de tu navegador

Accede a esta utilidad en cualquier momento con Alt+M sin cambiar de pestaña. 100% offline y gratis.

Obtener extensión

Cómo generar archivos .htaccess

  1. 1Seleccione las opciones de redirección y seguridad.
  2. 2Elija la estrategia de dominio con o sin www.
  3. 3Copie o descargue el archivo en la raíz web.

Enrutamiento Web Apache

Sintaxis estándar de mod_rewrite compatible con servidores compartidos y VPS.

Preguntas Frecuentes (FAQ)

¿Te resulta útil Generador de Archivos Apache .htaccess?¡Ayuda a otros desarrolladores a descubrir herramientas privadas y sin publicidad!

MiniToolDesk es 100% gratuito y en el navegador. Tu apoyo mantiene la web libre de anuncios.

Herramientas Relacionadas