From 1d1fd511f9956fe90fa66550ce9159c7ac2308c7 Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Mon, 20 May 2024 16:24:43 +0530 Subject: [PATCH] Updated: htaccess file comptible with apache 2.2 and 2.4 --- .gitignore | 1 + admin/backups/.htaccess | 12 +++++++++-- admin/export/.htaccess | 12 +++++++++-- admin/import/.htaccess | 12 +++++++++-- admin/tabs/.htaccess | 12 +++++++++-- classes/.htaccess | 12 +++++++++-- config/.htaccess | 12 +++++++++-- config/xml/.htaccess | 12 +++++++++-- docs/.htaccess | 11 +++++++++- docs/csv_import/.htaccess | 11 +++++++++- download/.htaccess | 12 +++++++++-- img/.htaccess | 16 ++++++++++++++ img/cms/.htaccess | 8 ------- log/.htaccess | 13 ++++++++++-- mails/.htaccess | 21 ++++++++++++++----- modules/.htaccess | 13 ++++++++++-- .../documents/.htaccess | 11 +++++++++- override/.htaccess | 12 +++++++++-- pdf/.htaccess | 17 ++++++++++++--- themes/.htaccess | 17 ++++++++++++--- tools/geoip/.htaccess | 12 +++++++++-- tools/htmlpurifier/.htaccess | 12 +++++++++-- tools/http_build_url/.htaccess | 12 +++++++++-- tools/js_minify/.htaccess | 12 +++++++++-- tools/minify_html/.htaccess | 12 +++++++++-- tools/mobile_Detect/.htaccess | 12 +++++++++-- tools/parser_sql/.htaccess | 12 +++++++++-- tools/pear/.htaccess | 12 +++++++++-- tools/profiling/.htaccess | 12 +++++++++-- tools/smarty/.htaccess | 12 +++++++++-- tools/swift/.htaccess | 12 +++++++++-- tools/tar/.htaccess | 12 +++++++++-- tools/tcpdf/.htaccess | 12 +++++++++-- tools/tcpdf/tools/.htaccess | 11 +++++++++- upload/.htaccess | 19 ++++++++++++----- 35 files changed, 357 insertions(+), 76 deletions(-) create mode 100644 img/.htaccess delete mode 100644 img/cms/.htaccess 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