Browse Source

new fixs mhs

muhammad riza 6 years ago
parent
commit
e6b6a5f70e
1 changed files with 13 additions and 10 deletions
  1. 13
    10
      .htaccess

+ 13
- 10
.htaccess View File

1
 RewriteEngine On
1
 RewriteEngine On
2
-    # If an existing asset or directory is requested go to it as it is
3
-    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
4
-    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
5
-    RewriteRule ^ - [L]
6
-    # If the requested resource doesn't exist, use index.html
2
+# If an existing asset or directory is requested go to it as it is
3
+RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
4
+RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
5
+RewriteRule ^ - [L]
6
+# If the requested resource doesn't exist, use index.html
7
 RewriteRule ^ /index.html
7
 RewriteRule ^ /index.html
8
 
8
 
9
 <IfModule mod_expires.c>
9
 <IfModule mod_expires.c>
22
 	ExpiresByType video/mpeg "access plus 1 year"
22
 	ExpiresByType video/mpeg "access plus 1 year"
23
 
23
 
24
 	# CSS, JavaScript
24
 	# CSS, JavaScript
25
-	ExpiresByType text/css "access plus 1 month"
26
-	ExpiresByType text/javascript "access plus 1 month"
27
-	ExpiresByType application/javascript "access plus 1 month"
25
+	# ExpiresByType text/css "access plus 1 month"
26
+	# ExpiresByType text/javascript "access plus 1 month"
27
+	# ExpiresByType application/javascript "access plus 1 month"
28
 </IfModule>
28
 </IfModule>
29
 
29
 
30
 <IfModule mod_headers.c>
30
 <IfModule mod_headers.c>
31
 	<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
31
 	<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
32
 		Header set Access-Control-Allow-Origin "*"
32
 		Header set Access-Control-Allow-Origin "*"
33
 	</FilesMatch>
33
 	</FilesMatch>
34
-	<FilesMatch "\.(ico|pdf|flv|swf|gif|png|jpg|jpeg|txt|html|htm)$">
35
-		Header set Cache-Control "max-age=2592000, public"
34
+	<FilesMatch "\.(ico|pdf|flv|swf|gif|png|jpg|jpeg|txt)$">
35
+		Header set Cache-Control "max-age=31536000, public"
36
 	</FilesMatch>
36
 	</FilesMatch>
37
 	<FilesMatch "\.(css|js)$">
37
 	<FilesMatch "\.(css|js)$">
38
+		Header set Cache-Control "max-age=604800, public"
39
+	</FilesMatch>
40
+	<FilesMatch "\.(html|htm)$">
38
 		FileETag None
41
 		FileETag None
39
 		Header unset ETag
42
 		Header unset ETag
40
 		Header unset Pragma
43
 		Header unset Pragma

Loading…
Cancel
Save