Skip to content

Commit 0fea252

Browse files
committed
2024-6-12
0 parents  commit 0fea252

File tree

458 files changed

+508253
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+508253
-0
lines changed

.htaccess

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
##### Optimize default expiration time - BEGIN
2+
<IfModule mod_expires.c>
3+
4+
## Enable expiration control
5+
ExpiresActive On
6+
7+
## CSS and JS expiration: 1 week after request
8+
ExpiresByType text/css "now plus 1 week"
9+
ExpiresByType application/javascript "now plus 1 week"
10+
ExpiresByType application/x-javascript "now plus 1 week"
11+
12+
## Image files expiration: 1 month after request
13+
ExpiresByType image/bmp "now plus 1 month"
14+
ExpiresByType image/gif "now plus 1 month"
15+
ExpiresByType image/jpeg "now plus 1 month"
16+
ExpiresByType image/webp "now plus 1 month"
17+
ExpiresByType image/jp2 "now plus 1 month"
18+
ExpiresByType image/pipeg "now plus 1 month"
19+
ExpiresByType image/png "now plus 1 month"
20+
ExpiresByType image/svg+xml "now plus 1 month"
21+
ExpiresByType image/tiff "now plus 1 month"
22+
ExpiresByType image/x-icon "now plus 1 month"
23+
ExpiresByType image/ico "now plus 1 month"
24+
ExpiresByType image/icon "now plus 1 month"
25+
ExpiresByType text/ico "now plus 1 month"
26+
ExpiresByType application/ico "now plus 1 month"
27+
ExpiresByType image/vnd.wap.wbmp "now plus 1 month"
28+
29+
## Font files expiration: 1 month after request
30+
ExpiresByType application/x-font-ttf "now plus 1 month"
31+
ExpiresByType application/x-font-opentype "now plus 1 month"
32+
ExpiresByType application/x-font-woff "now plus 1 month"
33+
ExpiresByType font/woff2 "now plus 1 month"
34+
ExpiresByType image/svg+xml "now plus 1 month"
35+
36+
## Audio files expiration: 1 month after request
37+
ExpiresByType audio/ogg "now plus 1 month"
38+
ExpiresByType application/ogg "now plus 1 month"
39+
ExpiresByType audio/basic "now plus 1 month"
40+
ExpiresByType audio/mid "now plus 1 month"
41+
ExpiresByType audio/midi "now plus 1 month"
42+
ExpiresByType audio/mpeg "now plus 1 month"
43+
ExpiresByType audio/mp3 "now plus 1 month"
44+
ExpiresByType audio/x-aiff "now plus 1 month"
45+
ExpiresByType audio/x-mpegurl "now plus 1 month"
46+
ExpiresByType audio/x-pn-realaudio "now plus 1 month"
47+
ExpiresByType audio/x-wav "now plus 1 month"
48+
49+
## Movie files expiration: 1 month after request
50+
ExpiresByType application/x-shockwave-flash "now plus 1 month"
51+
ExpiresByType x-world/x-vrml "now plus 1 month"
52+
ExpiresByType video/x-msvideo "now plus 1 month"
53+
ExpiresByType video/mpeg "now plus 1 month"
54+
ExpiresByType video/mp4 "now plus 1 month"
55+
ExpiresByType video/quicktime "now plus 1 month"
56+
ExpiresByType video/x-la-asf "now plus 1 month"
57+
ExpiresByType video/x-ms-asf "now plus 1 month"
58+
</IfModule>
59+
##### Optimize default expiration time - END
60+
61+
##### 1 Month for most static resources
62+
<filesMatch ".(css|jpg|jpeg|png|webp|gif|js|ico|woff|woff2|eot|ttf)$">
63+
Header set Cache-Control "public, max-age=31536000, immutable"
64+
</filesMatch>
65+
66+
##### Enable gzip compression for resources
67+
<ifModule mod_gzip.c>
68+
mod_gzip_on Yes
69+
mod_gzip_dechunk Yes
70+
mod_gzip_item_include file .(html?|txt|css|js|php)$
71+
mod_gzip_item_include handler ^cgi-script$
72+
mod_gzip_item_include mime ^text/.*
73+
mod_gzip_item_include mime ^application/x-javascript.*
74+
mod_gzip_item_exclude mime ^image/.*
75+
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
76+
</ifModule>
77+
78+
##### Or, compress certain file types by extension:
79+
<FilesMatch ".(html|css|jpg|jpeg|webp|png|gif|js|ico)">
80+
SetOutputFilter DEFLATE
81+
</FilesMatch>
82+
83+
##### Set Header Vary: Accept-Encoding
84+
<IfModule mod_headers.c>
85+
<FilesMatch ".(js|css|xml|gz|html)$">
86+
Header append Vary: Accept-Encoding
87+
</FilesMatch>
88+
</IfModule>

0 commit comments

Comments
 (0)