-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
39 lines (30 loc) · 1.44 KB
/
Copy path.htaccess
File metadata and controls
39 lines (30 loc) · 1.44 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
# ----------------------------------------------------------------------
# | Custom Error Pages |
# ----------------------------------------------------------------------
# Point all 404 errors to the custom 404.html page
ErrorDocument 404 /404.html
# ----------------------------------------------------------------------
# | Security Headers |
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
# Prevent the site from being embedded in an iframe (Clickjacking protection)
Header set X-Frame-Options "DENY"
# Prevent MIME-sniffing
Header set X-Content-Type-Options "nosniff"
# Enable Cross-Site Scripting filter
Header set X-XSS-Protection "1; mode=block"
</IfModule>
# ----------------------------------------------------------------------
# | Browser Caching |
# ----------------------------------------------------------------------
<IfModule mod_expires.c>
ExpiresActive On
# Images
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
# CSS/JS
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
</IfModule>