diff --git a/.gitignore b/.gitignore
index ae0a05c8f..9ce95681a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@ composer.lock
img/**
!/img/404.gif
+!/img/.htaccess
!/img/admin/
!/img/admin/*.gif
!/img/admin/*.png
diff --git a/admin/backups/.htaccess b/admin/backups/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/admin/backups/.htaccess
+++ b/admin/backups/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/admin/export/.htaccess b/admin/export/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/admin/export/.htaccess
+++ b/admin/export/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/admin/import/.htaccess b/admin/import/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/admin/import/.htaccess
+++ b/admin/import/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/admin/tabs/.htaccess b/admin/tabs/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/admin/tabs/.htaccess
+++ b/admin/tabs/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/classes/.htaccess b/classes/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/classes/.htaccess
+++ b/classes/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/config/.htaccess b/config/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/config/.htaccess
+++ b/config/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/config/xml/.htaccess b/config/xml/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/config/xml/.htaccess
+++ b/config/xml/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/docs/.htaccess b/docs/.htaccess
index 8703119f9..3de9e4008 100644
--- a/docs/.htaccess
+++ b/docs/.htaccess
@@ -1 +1,10 @@
-Deny from ALL
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/docs/csv_import/.htaccess b/docs/csv_import/.htaccess
index 18aba5838..041b7e558 100644
--- a/docs/csv_import/.htaccess
+++ b/docs/csv_import/.htaccess
@@ -1 +1,10 @@
-Allow from ALL
\ No newline at end of file
+# Apache 2.2
+
+ Order allow,deny
+ Allow from ALL
+
+
+# Apache 2.4
+
+ Require all granted
+
diff --git a/download/.htaccess b/download/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/download/.htaccess
+++ b/download/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/img/.htaccess b/img/.htaccess
new file mode 100644
index 000000000..b892de715
--- /dev/null
+++ b/img/.htaccess
@@ -0,0 +1,16 @@
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+ Allow from all
+
+
+
+# Apache 2.4
+
+ Require all denied
+
+ Require all granted
+
+
\ No newline at end of file
diff --git a/img/cms/.htaccess b/img/cms/.htaccess
deleted file mode 100644
index 91920ed0a..000000000
--- a/img/cms/.htaccess
+++ /dev/null
@@ -1,8 +0,0 @@
-
- php_flag engine off
-
-deny from all
-
- order deny,allow
- allow from all
-
diff --git a/log/.htaccess b/log/.htaccess
index 93169e4eb..7c2f481d2 100644
--- a/log/.htaccess
+++ b/log/.htaccess
@@ -1,2 +1,11 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
+
diff --git a/mails/.htaccess b/mails/.htaccess
index 45feba9cf..1bb323e41 100644
--- a/mails/.htaccess
+++ b/mails/.htaccess
@@ -1,5 +1,16 @@
-Order deny,allow
-Deny from all
-
-Allow from all
-
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+ Allow from all
+
+
+
+# Apache 2.4
+
+ Require all denied
+
+ Require all granted
+
+
diff --git a/modules/.htaccess b/modules/.htaccess
index d6fd8d12b..cd6d6b97f 100644
--- a/modules/.htaccess
+++ b/modules/.htaccess
@@ -1,3 +1,12 @@
-
-Deny from all
+
+ # Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+ # Apache 2.4
+
+ Require all denied
+
diff --git a/modules/hotelreservationsystem/documents/.htaccess b/modules/hotelreservationsystem/documents/.htaccess
index 14249c50b..3de9e4008 100644
--- a/modules/hotelreservationsystem/documents/.htaccess
+++ b/modules/hotelreservationsystem/documents/.htaccess
@@ -1 +1,10 @@
-Deny from all
\ No newline at end of file
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/override/.htaccess b/override/.htaccess
index 896fbc5a3..3de9e4008 100644
--- a/override/.htaccess
+++ b/override/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
\ No newline at end of file
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/pdf/.htaccess b/pdf/.htaccess
index 3caa91589..edaca433a 100644
--- a/pdf/.htaccess
+++ b/pdf/.htaccess
@@ -1,3 +1,14 @@
-
-Deny from all
-
\ No newline at end of file
+# Apache 2.2
+
+ Order deny,allow
+
+ Deny from all
+
+
+
+# Apache 2.4
+
+
+ Require all denied
+
+
diff --git a/themes/.htaccess b/themes/.htaccess
index 3caa91589..edaca433a 100644
--- a/themes/.htaccess
+++ b/themes/.htaccess
@@ -1,3 +1,14 @@
-
-Deny from all
-
\ No newline at end of file
+# Apache 2.2
+
+ Order deny,allow
+
+ Deny from all
+
+
+
+# Apache 2.4
+
+
+ Require all denied
+
+
diff --git a/tools/geoip/.htaccess b/tools/geoip/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/geoip/.htaccess
+++ b/tools/geoip/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/htmlpurifier/.htaccess b/tools/htmlpurifier/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/htmlpurifier/.htaccess
+++ b/tools/htmlpurifier/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/http_build_url/.htaccess b/tools/http_build_url/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/http_build_url/.htaccess
+++ b/tools/http_build_url/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/js_minify/.htaccess b/tools/js_minify/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/js_minify/.htaccess
+++ b/tools/js_minify/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/minify_html/.htaccess b/tools/minify_html/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/minify_html/.htaccess
+++ b/tools/minify_html/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/mobile_Detect/.htaccess b/tools/mobile_Detect/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/mobile_Detect/.htaccess
+++ b/tools/mobile_Detect/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/parser_sql/.htaccess b/tools/parser_sql/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/parser_sql/.htaccess
+++ b/tools/parser_sql/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/pear/.htaccess b/tools/pear/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/pear/.htaccess
+++ b/tools/pear/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/profiling/.htaccess b/tools/profiling/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/profiling/.htaccess
+++ b/tools/profiling/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/smarty/.htaccess b/tools/smarty/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/smarty/.htaccess
+++ b/tools/smarty/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/swift/.htaccess b/tools/swift/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/swift/.htaccess
+++ b/tools/swift/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/tar/.htaccess b/tools/tar/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/tar/.htaccess
+++ b/tools/tar/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/tcpdf/.htaccess b/tools/tcpdf/.htaccess
index 93169e4eb..3de9e4008 100644
--- a/tools/tcpdf/.htaccess
+++ b/tools/tcpdf/.htaccess
@@ -1,2 +1,10 @@
-Order deny,allow
-Deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
diff --git a/tools/tcpdf/tools/.htaccess b/tools/tcpdf/tools/.htaccess
index 8d2f25636..224784069 100644
--- a/tools/tcpdf/tools/.htaccess
+++ b/tools/tcpdf/tools/.htaccess
@@ -1 +1,10 @@
-deny from all
+# Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+# Apache 2.4
+
+ Require all denied
+
\ No newline at end of file
diff --git a/upload/.htaccess b/upload/.htaccess
index 33b4fbec0..37095a359 100644
--- a/upload/.htaccess
+++ b/upload/.htaccess
@@ -1,7 +1,16 @@
- RemoveHandler .php .phtml .php3 .php4 .php5
- RemoveType .php .phtml .php3 .php4 .php5
-
-
- php_flag engine off
+ RemoveHandler .php .phtml .php3 .php4 .php5 .php7 .php8
+ RemoveType .php .phtml .php3 .php4 .php5 .php7 .php8
+
+ # Apache 2.2
+
+ Order deny,allow
+ Deny from all
+
+
+ # Apache 2.4
+
+ Require all denied
+
+
\ No newline at end of file