rewrite wrong (sub)domains, unify indentation

This commit is contained in:
2019-10-27 19:36:50 +01:00
parent 0a5b33e141
commit d5f3c1c3bb

View File

@@ -1,6 +1,14 @@
RewriteEngine On RewriteEngine On
RewriteBase / RewriteBase /
# Redirect www, other domains, non-HTTPS
RewriteCond %{HTTP_HOST} ^www\.mehl\.mx$ [NC]
RewriteRule ^(.*)$ https://mehl.mx/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^mehl\.mx$ [NC]
RewriteRule ^(.*)$ https://mehl.mx/ [R=301,L]
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://mehl.mx/$1 [R=301,L]
# Redirect old links # Redirect old links
RewriteRule ^(en|de)/(.*)$ /$2 [R=301,L] RewriteRule ^(en|de)/(.*)$ /$2 [R=301,L]
RewriteRule ^(en|de)/?$ / [R=301,L] RewriteRule ^(en|de)/?$ / [R=301,L]
@@ -23,24 +31,24 @@ AddOutputFilterByType DEFLATE application/x-javascript
# Caching # Caching
<ifModule mod_expires.c> <ifModule mod_expires.c>
# A = access <seconds> # A = access <seconds>
ExpiresActive On ExpiresActive On
ExpiresByType text/html A300 ExpiresByType text/html A300
ExpiresByType text/plain A300 ExpiresByType text/plain A300
ExpiresDefault A604800 ExpiresDefault A604800
ExpiresByType text/javascript A604800 ExpiresByType text/javascript A604800
ExpiresByType application/javascript A604800 ExpiresByType application/javascript A604800
ExpiresByType application/x-javascript A604800 ExpiresByType application/x-javascript A604800
ExpiresByType text/css A604800 ExpiresByType text/css A604800
ExpiresByType image/gif A604800 ExpiresByType image/gif A604800
ExpiresByType image/png A604800 ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800 ExpiresByType image/jpeg A604800
ExpiresByType application/x-shockwave-flash A604800 ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A604800 ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A604800 ExpiresByType application/pdf A604800
ExpiresByType application/x-httpd-php A604800 ExpiresByType application/x-httpd-php A604800
ExpiresByType image/x-icon A2592000 ExpiresByType image/x-icon A2592000
</ifModule> </ifModule>