Skip to content

Commit 290d612

Browse files
committed
Improve security
1 parent c99808c commit 290d612

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

.htaccess

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
RewriteCond %{REQUEST_URI} (.+)/$
1515
RewriteRule ^ %1 [L,R=301]
1616

17+
index.php
18+
RewriteCond %{REQUEST_URI} !^/index\.php$
19+
RewriteRule \.php$ - [F,L]
20+
1721
# Send Requests To Front Controller...
1822
RewriteCond %{REQUEST_FILENAME} !-d
1923
RewriteCond %{REQUEST_FILENAME} !-f
@@ -32,4 +36,28 @@ Deny from all
3236
<Files ~ "\.zip$">
3337
Order allow,deny
3438
Deny from all
35-
</Files>
39+
</Files>
40+
<Files ~ "\.log$">
41+
Order allow,deny
42+
Deny from all
43+
</Files>
44+
45+
<IfModule mod_rewrite.c>
46+
<IfModule mod_negotiation.c>
47+
Options -MultiViews -Indexes
48+
</IfModule>
49+
50+
RewriteEngine On
51+
52+
# Block access to .env files
53+
RewriteRule ^.*\.env$ - [F,L]
54+
55+
# Block access to SQLite database files
56+
RewriteRule ^.*\.sqlite$ - [F,L]
57+
58+
# Block access to ZIP files
59+
RewriteRule ^.*\.zip$ - [F,L]
60+
61+
# Block access to LOG files
62+
RewriteRule ^.*\.log$ - [F,L]
63+
</IfModule>

0 commit comments

Comments
 (0)