-
Notifications
You must be signed in to change notification settings - Fork 6
/
.htaccess
executable file
·70 lines (60 loc) · 2.07 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
59
60
61
62
63
64
65
66
67
68
69
70
# Protect files and directories from prying eyes.
# Directories are final path only, not between.
<FilesMatch "(\.(inc|sh|txt|tpl|backup|test|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.orig\.save)$|deleted|backup|vendor|config)[^config_client\.js|make_backup\.js]">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
</IfModule>
</FilesMatch>
# Browser caching FileETag control
# <FilesMatch ".+\.(js|css)$">
# # Set FileETag looking MTime and size to allow detect changes on js and css files
# # @see https://stackoverflow.com/questions/13215213/how-do-i-configure-etags
# FileETag All
# # FileETag INode,
# # FileETag MTime,
# # FileETag Size,
# # FileETag INode MTime,
# # FileETag INode Size or
# # FileETag MTime Size may also be set.
# # FileETag All
# # Remove ETag optional way
# # Header unset ETag
# # FileETag none
# # Header set Cache-Control "public, must-revalidate, max-age=3600"
# # Header unset ETag
# </filesMatch>
# Deny paths final and between
# RewriteEngine On
# RewriteRule (config) - [F,L]
# <FilesMatch ".(eot|ttf|otf|woff|woff2)">
# Header set Access-Control-Allow-Origin "*"
# </FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Set the default handler.
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
# 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
# PRODUCTION
# Set cache files for one week 3600 * 24 * 7 = 604800
# Header set Cache-Control: stale-while-revalidate=604800
# DEVELOPMENT
# <If "%{HTTP_HOST} =~ /(127\.0\.0\.1.+|localhost.+)$/">
# Header set Cache-Control: "no-store, max-age=0"
# Header unset ETag
# </If>
# </IfModule>
# re-direct old v5 paths to the new ones
<IfModule mod_rewrite.c>
# str_manager
RewriteRule ^lib/dedalo/extras/str_manager/$ core/extras/str_manager/ [NS,L]
</IfModule>