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|png|bmp|webp) - [NC,L,R=404]
# PHP front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
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>

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?)$">
<IfModule !mod_authz_core.c>
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)$">
# Apache 2.2
<IfModule !mod_authz_core.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from all
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</FilesMatch>
</IfModule>

View file

@ -1,13 +1,18 @@
<Files .*>
# Apache 2.2
<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>
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</Files>
SetHandler default-handler
</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,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?)$">
<IfModule !mod_authz_core.c>
Order Allow,Deny