This commit is contained in:
Rodolfo Berrios 2021-10-27 21:06:35 -03:00
parent a36cd07286
commit 4f635699ac
No known key found for this signature in database
GPG key ID: D3AAC2481DBDD9FE
8 changed files with 28 additions and 71 deletions

View file

@ -31,7 +31,12 @@ Options -MultiViews
#RewriteRule images/.+\.(gif|jpe?g|a?png|bmp|webp) content/images/system/default/404.gif [NC,L] #RewriteRule images/.+\.(gif|jpe?g|a?png|bmp|webp) content/images/system/default/404.gif [NC,L]
RewriteRule images/.+\.(gif|jpe?g|png|bmp|webp) - [NC,L,R=404] RewriteRule images/.+\.(gif|jpe?g|png|bmp|webp) - [NC,L,R=404]
# PHP front controller
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L] RewriteRule . index.php [L]
# Single PHP-entrypoint (disables direct access to .php files)
RewriteCond %{THE_REQUEST} ^.+?\ [^?]+\.php[?\ ] [NC]
RewriteRule \.php$ - [NC,L,F,R=404]
</IfModule> </IfModule>

View file

@ -1,12 +1,3 @@
<LimitExcept GET>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from all
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</LimitExcept>
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$"> <FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
<IfModule !mod_authz_core.c> <IfModule !mod_authz_core.c>
Order Allow,Deny Order Allow,Deny

View file

@ -1,27 +0,0 @@
<LimitExcept GET>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from all
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</LimitExcept>
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from all
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</FilesMatch>
<IfModule mod_php7.c>
php_flag engine off
</IfModule>
<FilesMatch ".+\.*$">
SetHandler !
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteRule ^.*\.php$ - [F,L]
</IfModule>

View file

@ -1,11 +1,7 @@
<FilesMatch "\.(txt)$"> <IfModule !mod_authz_core.c>
# Apache 2.2 Order Allow,Deny
<IfModule !mod_authz_core.c> Deny from all
Order Allow,Deny </IfModule>
Deny from all <IfModule mod_authz_core.c>
</IfModule> Require all denied
# Apache 2.4 </IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</FilesMatch>

View file

@ -1,13 +1,18 @@
<Files .*> <FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
# Apache 2.2
<IfModule !mod_authz_core.c> <IfModule !mod_authz_core.c>
Order Allow,Deny Order Allow,Deny
Deny from all Deny from all
</IfModule> </IfModule>
# Apache 2.4
<IfModule mod_authz_core.c> <IfModule mod_authz_core.c>
Require all denied Require all denied
</IfModule> </IfModule>
</Files> </FilesMatch>
<IfModule mod_php7.c>
SetHandler default-handler php_flag engine off
</IfModule>
<FilesMatch ".+\.*$">
SetHandler !
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteRule ^.*\.php$ - [F,L]
</IfModule>

View file

@ -1,4 +0,0 @@
<FilesMatch "\.php$">
Order Deny,Allow
Deny from all
</FilesMatch>

View file

@ -1,12 +1,3 @@
<LimitExcept GET>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from all
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</LimitExcept>
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$"> <FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
<IfModule !mod_authz_core.c> <IfModule !mod_authz_core.c>
Order Allow,Deny Order Allow,Deny

View file

@ -1,7 +1,7 @@
<IfModule !mod_authz_core.c> <IfModule !mod_authz_core.c>
Order Allow,Deny Order Allow,Deny
Deny from all Deny from all
</IfModule> </IfModule>
<IfModule mod_authz_core.c> <IfModule mod_authz_core.c>
Require all denied Require all denied
</IfModule> </IfModule>