From 8ca80ba7458ee0c866660740188d2c337ac67729 Mon Sep 17 00:00:00 2001 From: Kasper Nowak <54978466+kaspernowak@users.noreply.github.com> Date: Wed, 5 Feb 2025 18:40:26 +0100 Subject: [PATCH] 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 block for Apache compatibility. - Ensures that both Apache and OpenLiteSpeed users have proper protection for protected files. --- .htaccess | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.htaccess b/.htaccess index b7f10ac0d..fb591179b 100644 --- a/.htaccess +++ b/.htaccess @@ -24,6 +24,10 @@ + # Prevent Direct Access to Protected Files (OpenLiteSpeed syntax) + RewriteCond %{REQUEST_URI} (^|/)(\.env|\.log|artisan)$ [NC] + RewriteRule .* - [F,L] + # Prevent Direct Access To Protected Folders RewriteRule ^(app|bootstrap|config|database|overrides|resources|routes|storage|tests)/(.*) / [L,R=301]