-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.htaccess.example
More file actions
27 lines (22 loc) · 779 Bytes
/
Copy path.htaccess.example
File metadata and controls
27 lines (22 loc) · 779 Bytes
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
# Optional Apache hardening example
#
# Application configuration now lives in `.env`, not in `.htaccess`.
# This file is only for Apache access rules when your host uses `.htaccess`.
Options -Indexes
<IfModule mod_authz_core.c>
<FilesMatch "^\.">
Require all denied
</FilesMatch>
<FilesMatch "^(?:\.env|\.git|\.gitignore|composer\.(?:json|lock)|package(?:-lock)?\.json|yarn\.lock)$">
Require all denied
</FilesMatch>
<FilesMatch "\.(?:env|log|sql|gz|sqlite|bak|old|dist)$">
Require all denied
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule (^|/)\. - [F,L]
RewriteRule ^(?:log|tmp)(?:/|$) - [F,L,NC]
RewriteRule \.(?:env|log|sql|gz|sqlite|bak|old|dist)$ - [F,L,NC]
</IfModule>