Browse Source

rewrite wrong (sub)domains, unify indentation

max.mehl 5 months ago
parent
commit
d5f3c1c3bb
No account linked to committer's email address
1 changed files with 28 additions and 20 deletions
  1. 28
    20
      static/.htaccess

+ 28
- 20
static/.htaccess View File

@@ -1,6 +1,14 @@
1 1
 RewriteEngine On
2 2
 RewriteBase /
3 3
 
4
+# Redirect www, other domains, non-HTTPS
5
+RewriteCond %{HTTP_HOST} ^www\.mehl\.mx$ [NC]
6
+RewriteRule ^(.*)$ https://mehl.mx/$1 [R=301,L]
7
+RewriteCond %{HTTP_HOST} !^mehl\.mx$ [NC]
8
+RewriteRule ^(.*)$ https://mehl.mx/ [R=301,L]
9
+RewriteCond %{HTTPS} !on
10
+RewriteRule ^(.*)$ https://mehl.mx/$1 [R=301,L]
11
+
4 12
 # Redirect old links
5 13
 RewriteRule ^(en|de)/(.*)$ /$2 [R=301,L]
6 14
 RewriteRule ^(en|de)/?$ / [R=301,L]
@@ -23,24 +31,24 @@ AddOutputFilterByType DEFLATE application/x-javascript
23 31
 
24 32
 # Caching
25 33
 <ifModule mod_expires.c>
26
-	# A = access <seconds>
27
-	ExpiresActive On
28
-	ExpiresByType text/html A300
29
-	ExpiresByType text/plain A300
30
-	ExpiresDefault A604800
31
-	
32
-	ExpiresByType text/javascript A604800
33
-	ExpiresByType application/javascript A604800
34
-	ExpiresByType application/x-javascript A604800
35
-	ExpiresByType text/css A604800
36
-	ExpiresByType image/gif A604800
37
-	ExpiresByType image/png A604800
38
-	ExpiresByType image/jpeg A604800
39
-	ExpiresByType application/x-shockwave-flash A604800
40
-	ExpiresByType video/x-flv A604800
41
-	ExpiresByType application/pdf A604800
42
-	ExpiresByType application/x-httpd-php A604800
43
-	
44
-	
45
-	ExpiresByType image/x-icon A2592000
34
+  # A = access <seconds>
35
+  ExpiresActive On
36
+  ExpiresByType text/html A300
37
+  ExpiresByType text/plain A300
38
+  ExpiresDefault A604800
39
+
40
+  ExpiresByType text/javascript A604800
41
+  ExpiresByType application/javascript A604800
42
+  ExpiresByType application/x-javascript A604800
43
+  ExpiresByType text/css A604800
44
+  ExpiresByType image/gif A604800
45
+  ExpiresByType image/png A604800
46
+  ExpiresByType image/jpeg A604800
47
+  ExpiresByType application/x-shockwave-flash A604800
48
+  ExpiresByType video/x-flv A604800
49
+  ExpiresByType application/pdf A604800
50
+  ExpiresByType application/x-httpd-php A604800
51
+
52
+
53
+  ExpiresByType image/x-icon A2592000
46 54
 </ifModule>

Loading…
Cancel
Save