Skip to content

Commit

Permalink
Updated: htaccess file comptible with apache 2.2 and 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
shreesh-webkul committed May 20, 2024
1 parent fb5d0a3 commit 1d1fd51
Show file tree
Hide file tree
Showing 35 changed files with 357 additions and 76 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ composer.lock

img/**
!/img/404.gif
!/img/.htaccess
!/img/admin/
!/img/admin/*.gif
!/img/admin/*.png
Expand Down
12 changes: 10 additions & 2 deletions admin/backups/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions admin/export/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions admin/import/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions admin/tabs/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions classes/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions config/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions config/xml/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
11 changes: 10 additions & 1 deletion docs/.htaccess
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
Deny from ALL
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
11 changes: 10 additions & 1 deletion docs/csv_import/.htaccess
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
Allow from ALL
# Apache 2.2
<IfModule !mod_authz_core.c>
Order allow,deny
Allow from ALL
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
12 changes: 10 additions & 2 deletions download/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
16 changes: 16 additions & 0 deletions img/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png|bmp|tiff|svg|pdf|mov|mpeg|mp4|avi|mpg|wma|flv|webm|ico|webp|avif)$">
Allow from all
</Files>
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png|bmp|tiff|svg|pdf|mov|mpeg|mp4|avi|mpg|wma|flv|webm|ico|webp|avif)$">
Require all granted
</Files>
</IfModule>
8 changes: 0 additions & 8 deletions img/cms/.htaccess

This file was deleted.

13 changes: 11 additions & 2 deletions log/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>

21 changes: 16 additions & 5 deletions mails/.htaccess
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Order deny,allow
Deny from all
<FilesMatch "\.(html|txt)$">
Allow from all
</FilesMatch>
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
<FilesMatch "\.(html|txt)$">
Allow from all
</FilesMatch>
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
<FilesMatch "\.(html|txt)$">
Require all granted
</FilesMatch>
</IfModule>
13 changes: 11 additions & 2 deletions modules/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<FilesMatch "\.tpl$">
Deny from all
<FilesMatch "(\.tpl|config\.xml|config_([a-z]+)\.xml)$">
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</FilesMatch>
11 changes: 10 additions & 1 deletion modules/hotelreservationsystem/documents/.htaccess
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions override/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
17 changes: 14 additions & 3 deletions pdf/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<FilesMatch "\.tpl$">
Deny from all
</FilesMatch>
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
<FilesMatch "\.tpl$">
Deny from all
</FilesMatch>
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
<FilesMatch "\.tpl$">
Require all denied
</FilesMatch>
</IfModule>
17 changes: 14 additions & 3 deletions themes/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<FilesMatch "\.tpl$">
Deny from all
</FilesMatch>
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
<FilesMatch "\.tpl$">
Deny from all
</FilesMatch>
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
<FilesMatch "\.tpl$">
Require all denied
</FilesMatch>
</IfModule>
12 changes: 10 additions & 2 deletions tools/geoip/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions tools/htmlpurifier/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions tools/http_build_url/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions tools/js_minify/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions tools/minify_html/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions tools/mobile_Detect/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions tools/parser_sql/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions tools/pear/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
12 changes: 10 additions & 2 deletions tools/profiling/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Order deny,allow
Deny from all
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
Loading

0 comments on commit 1d1fd51

Please sign in to comment.