forked from ProboCI/probo-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
htaccess
58 lines (53 loc) · 1.75 KB
/
htaccess
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
---
layout: null
permalink: .htaccess
---
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
</IfModule>
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Set the default handler.
DirectoryIndex index.php index.html index.htm
# Add correct encoding for SVGZ.
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# Set browser caching
# ------------------------------------------------------------------------------
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Images
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
# CSS
ExpiresByType text/css "access 1 month"
# HTML
ExpiresByType text/html "access 1 month"
# PDF
ExpiresByType application/pdf "access 1 month"
# JS
ExpiresByType text/x-javascript "access 1 month"
# Flash
ExpiresByType application/x-shockwave-flash "access 1 month"
# Favicon
ExpiresByType image/x-icon "access 1 year"
# Default directive
ExpiresDefault "access 1 month"
</IfModule>
# End caching block
# Various header fixes.
<IfModule mod_headers.c>
# Disable content sniffing, since it's an attack vector.
Header always set X-Content-Type-Options nosniff
# Disable Proxy header, since it's an attack vector.
RequestHeader unset Proxy
</IfModule>