eat: add OpenLiteSpeed rewrite rule for protected files
- Added a rewrite rule to block direct access to sensitive files (.env, .log, artisan) for OpenLiteSpeed environments. - Retained the existing <FilesMatch> block for Apache compatibility. - Ensures that both Apache and OpenLiteSpeed users have proper protection for protected files.
This commit is contained in:
parent
fa83ee7bc3
commit
8ca80ba745
|
|
@ -24,6 +24,10 @@
|
||||||
</IfModule>
|
</IfModule>
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
||||||
|
# Prevent Direct Access to Protected Files (OpenLiteSpeed syntax)
|
||||||
|
RewriteCond %{REQUEST_URI} (^|/)(\.env|\.log|artisan)$ [NC]
|
||||||
|
RewriteRule .* - [F,L]
|
||||||
|
|
||||||
# Prevent Direct Access To Protected Folders
|
# Prevent Direct Access To Protected Folders
|
||||||
RewriteRule ^(app|bootstrap|config|database|overrides|resources|routes|storage|tests)/(.*) / [L,R=301]
|
RewriteRule ^(app|bootstrap|config|database|overrides|resources|routes|storage|tests)/(.*) / [L,R=301]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue