My personal website built with Hugo
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.

55 lines
1.6 KiB

3 years ago
RewriteEngine On
RewriteBase /
# Redirect www, other domains, non-HTTPS
RewriteCond %{HTTP_HOST} ^www\.mehl\.mx$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]
2 years ago
RewriteCond %{HTTP_HOST} !^mehl\.mx(.*)$ [NC]
RewriteRule ^(.*)$ [R=301,L]
2 years ago
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$$1 [R=301,L]
2 years ago
# Redirect old links
3 years ago
RewriteRule ^(en|de)/(.*)$ /$2 [R=301,L]
RewriteRule ^(en|de)/?$ / [R=301,L]
RewriteRule ^about/?$ / [R=301,L]
2 years ago
# Error documents
ErrorDocument 404 /404.html
# Compression
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# Caching
<ifModule mod_expires.c>
# A = access <seconds>
ExpiresActive On
ExpiresByType text/html A300
ExpiresByType text/plain A300
ExpiresDefault A604800
ExpiresByType text/javascript A604800
ExpiresByType application/javascript A604800
ExpiresByType application/x-javascript A604800
ExpiresByType text/css A604800
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A604800
ExpiresByType application/x-httpd-php A604800
ExpiresByType image/x-icon A2592000