forked from microweber/microweber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
59 lines (42 loc) · 1.51 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
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
<IfModule mod_security.c>
SecRuleEngine Off
SecFilterInheritance Off
SecFilterEngine Off
SecFilterScanPOST Off
SecFilterCheckURLEncoding Off
</IfModule>
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule "(^|/)\." - [F]
RewriteRule ^.*\.(gif|jpe?g|png|svg|bmp|webp|ico)$ - [L]
RewriteCond %{REQUEST_URI} ^/userfiles/.*$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/userfiles/media/.*$ [NC]
RewriteRule . - [PT,L]
ErrorDocument 404 /404.html
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.*)$ index.php [NC,L]
RewriteRule ^(.*)$ index.php [QSA,L]
RedirectMatch 404 /\\.git(/|$)
RedirectMatch 404 /\\.env(/|$)
</IfModule>
<FilesMatch "phpunit.xml|composer.lock|\.(dist|db|markdown|md|twig|yaml|yml)|(bower|composer|jsdoc|package)\.json$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</FilesMatch>
RedirectMatch 404 /(vendor|gulp|src|storage|database|config|bootstrap|tests)(/|$)