-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.htaccess
More file actions
81 lines (74 loc) · 2.64 KB
/
.htaccess
File metadata and controls
81 lines (74 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Folders
Options +Indexes
IndexOptions FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=*
# Security headers
<IfModule mod_headers.c>
Header set X-Content-Type-Options nosniff
</IfModule>
# PHP settings
<IfModule mod_php7.c>
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
php_value session.gc_maxlifetime 1200
</IfModule>
# Gzip-Ecoding
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>
# Cache-Control
# One month for image files
<filesMatch ".(jpg|jpeg|png|gif|ico|svg)$">
# Header set Cache-Control "max-age=2592000"
</filesMatch>
# One month for font files
<filesMatch ".(eot|ttf|woff|woff2|otf)$">
# Header set Cache-Control "max-age=2592000"
</filesMatch>
# One week for css
<filesMatch ".(css)$">
# Header set Cache-Control "max-age=604800"
</filesMatch>
# Six hours for javascript
<filesMatch ".(js)$">
# Header set Cache-Control "max-age=21600"
</filesMatch>
# One year for html
<filesMatch ".(html)$">
# Header set Cache-Control "max-age=31536000"
</filesMatch>
# Access-Control-Allow-Origin
<filesMatch ".(jpg|jpeg|png|gif|ico|svg|css|html|js|eot|ttf|woff|woff2|otf)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Cache-Control "no-cache, no-store, must-revalidate"
</IfModule>
</filesMatch>
# 404: point to the index for Errors
ErrorDocument 404 /error.html