Browse Source

.htaccess :wrench:

windhamdavid 4 years ago
parent
commit
a9b07b2de6
1 changed files with 26 additions and 0 deletions
  1. 26 0
      .htaccess

+ 26 - 0
.htaccess

@@ -0,0 +1,26 @@
+<IfModule mod_expires.c>
+    ExpiresActive On
+    ExpiresByType image/jpeg "access plus 1 year"
+    ExpiresByType image/gif "access plus 1 year"
+    ExpiresByType image/png "access plus 1 year"
+    ExpiresByType image/webp "access plus 1 year"
+    ExpiresByType image/svg+xml "access plus 1 year"
+    ExpiresByType image/x-icon "access plus 1 year"
+    ExpiresByType video/mp4 "access plus 1 year"
+    ExpiresByType video/mpeg "access plus 1 year"
+    ExpiresByType application/pdf "access plus 1 year"
+    ExpiresByType text/javascript "access plus 1 month"
+    ExpiresByType application/javascript "access plus 1 month"
+    ExpiresByType text/css "access plus 1 week"
+</IfModule>
+<ifModule mod_headers.c>
+    <filesMatch ".(gif|ico|jpg|jpeg|mp4|mpeg|png|svg|webp)$">
+        Header set Cache-Control "max-age=31536000, public"
+    </filesMatch>
+    <filesMatch ".(js|pdf)$">
+        Header set Cache-Control "max-age=2592000, public"
+    </filesMatch>
+    <filesMatch ".(css)$">
+        Header set Cache-Control "max-age=604800, public"
+    </filesMatch>
+</ifModule>