From 5ee1c9580f754ed366ab06bbadf7f27f2a186063 Mon Sep 17 00:00:00 2001 From: wrongecho Date: Mon, 3 Aug 2026 17:51:04 +0100 Subject: [PATCH] Enhance .htaccess rules --- .gitignore | 1 + .htaccess | 2 +- scripts/.htaccess | 6 +++--- uploads/tmp/.htaccess | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 uploads/tmp/.htaccess diff --git a/.gitignore b/.gitignore index 1d73a564..f18711d1 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ uploads/users/* !uploads/users/index.php uploads/tmp/* !uploads/tmp/index.php +!uploads/tmp/.htaccess uploads/backups/* !uploads/backups/index.php !uploads/backups/.htaccess diff --git a/.htaccess b/.htaccess index f38dbabc..826afe9a 100644 --- a/.htaccess +++ b/.htaccess @@ -1,2 +1,2 @@ # Prevent access to .git, .github, and config.php -RedirectMatch 404 ^/(\.git|\.github|config\.php) \ No newline at end of file +RedirectMatch 401 ^/(\.git|\.github|config\.php) diff --git a/scripts/.htaccess b/scripts/.htaccess index 77b4e697..7cb1de17 100644 --- a/scripts/.htaccess +++ b/scripts/.htaccess @@ -1,3 +1,3 @@ - - Require all denied - \ No newline at end of file +Require all denied +Options -ExecCGI -Indexes +php_flag engine off diff --git a/uploads/tmp/.htaccess b/uploads/tmp/.htaccess new file mode 100644 index 00000000..7cb1de17 --- /dev/null +++ b/uploads/tmp/.htaccess @@ -0,0 +1,3 @@ +Require all denied +Options -ExecCGI -Indexes +php_flag engine off