My personal website built with Hugo https://mehl.mx
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.htaccess 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. RewriteEngine On
  2. RewriteBase /
  3. # Redirect www, other domains, non-HTTPS
  4. RewriteCond %{HTTP_HOST} ^www\.mehl\.mx$ [NC]
  5. RewriteRule ^(.*)$ https://mehl.mx/$1 [R=301,L]
  6. RewriteCond %{HTTP_HOST} !^mehl\.mx(.*)$ [NC]
  7. RewriteRule ^(.*)$ https://mehl.mx/ [R=301,L]
  8. RewriteCond %{SERVER_PORT} !^443$
  9. RewriteRule ^(.*)$ https://mehl.mx/$1 [R=301,L]
  10. # Redirect old links
  11. RewriteRule ^(en|de)/(.*)$ /$2 [R=301,L]
  12. RewriteRule ^(en|de)/?$ / [R=301,L]
  13. RewriteRule ^about/?$ / [R=301,L]
  14. # Error documents
  15. ErrorDocument 404 /404.html
  16. # Compression
  17. AddOutputFilterByType DEFLATE text/plain
  18. AddOutputFilterByType DEFLATE text/html
  19. AddOutputFilterByType DEFLATE text/xml
  20. AddOutputFilterByType DEFLATE text/css
  21. AddOutputFilterByType DEFLATE text/javascript
  22. AddOutputFilterByType DEFLATE application/xml
  23. AddOutputFilterByType DEFLATE application/xhtml+xml
  24. AddOutputFilterByType DEFLATE application/rss+xml
  25. AddOutputFilterByType DEFLATE application/javascript
  26. AddOutputFilterByType DEFLATE application/x-javascript
  27. # Caching
  28. <ifModule mod_expires.c>
  29. # A = access <seconds>
  30. ExpiresActive On
  31. ExpiresByType text/html A300
  32. ExpiresByType text/plain A300
  33. ExpiresDefault A604800
  34. ExpiresByType text/javascript A604800
  35. ExpiresByType application/javascript A604800
  36. ExpiresByType application/x-javascript A604800
  37. ExpiresByType text/css A604800
  38. ExpiresByType image/gif A604800
  39. ExpiresByType image/png A604800
  40. ExpiresByType image/jpeg A604800
  41. ExpiresByType application/x-shockwave-flash A604800
  42. ExpiresByType video/x-flv A604800
  43. ExpiresByType application/pdf A604800
  44. ExpiresByType application/x-httpd-php A604800
  45. ExpiresByType image/x-icon A2592000
  46. </ifModule>