-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy path.htaccess
More file actions
74 lines (68 loc) · 2.97 KB
/
Copy path.htaccess
File metadata and controls
74 lines (68 loc) · 2.97 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
AddType image/svg+xml .svg
AddType image/svg+xml .svgz
AddType image/x-icon .ico
AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
AddType application/mathematica ma nb mb
Options -Indexes
<IfModule mod_php7.c>
php_value upload_max_filesize 15M
php_value post_max_size 128M
php_value max_input_vars 5000
php_value max_input_time 300
php_value memory_limit 128M
</IfModule>
<IfModule mod_php.c>
php_value upload_max_filesize 15M
php_value post_max_size 128M
php_value max_input_vars 5000
php_value max_input_time 300
php_value memory_limit 128M
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(eot|ttf|otf|woff|woff2|png|jpg|gif|cur|css)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
<FilesMatch "\.(eot|ttf|otf|woff|woff2|png|jpg|gif|svg|cur|css|js)$">
Header set Cache-Control "public, max-age=14400"
</FilesMatch>
</IfModule>
RewriteEngine On
# Deny all files and directories starting with a '.'
RewriteRule "(^|/)\." - [R=404,L]
# Deny some other files and extensions
RewriteRule "(^|/)(config|deploy-scripts|docker)" - [R=404,L]
RewriteRule "^(composer\.(json|lock)|phpunit\.xml|codeception\.yml|docker-compose\.yml)$" - [R=404,L]
RewriteRule "\.(dist|md|log)$" - [R=404,L]
# If request is a directory
RewriteCond %{REQUEST_FILENAME} -d
# And no index file exists
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
# Return 404
RewriteRule ^ - [R=404,L]
# Only pass existing PHP files to PHP-FPM
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.php([0-9]?|/|$) - [R=404,L]
# Annoying vulnerability scans
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*admin.*) - [R=404,L]
RewriteRule (.*mysql.*) - [R=404,L]
RewriteRule ^sql(.*) - [R=404,L]
RewriteRule ^db(.*) - [R=404,L]
RewriteRule ^php(.*) - [R=404,L]
RewriteRule ^pma(.*) - [R=404,L]