Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit 4f63569

Browse files
committed
close #118
1 parent a36cd07 commit 4f63569

File tree

8 files changed

+28
-71
lines changed

8 files changed

+28
-71
lines changed

.htaccess

+5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ Options -MultiViews
3131
#RewriteRule images/.+\.(gif|jpe?g|a?png|bmp|webp) content/images/system/default/404.gif [NC,L]
3232
RewriteRule images/.+\.(gif|jpe?g|png|bmp|webp) - [NC,L,R=404]
3333

34+
# PHP front controller
3435
RewriteCond %{REQUEST_FILENAME} !-f
3536
RewriteCond %{REQUEST_FILENAME} !-d
3637
RewriteRule . index.php [L]
38+
39+
# Single PHP-entrypoint (disables direct access to .php files)
40+
RewriteCond %{THE_REQUEST} ^.+?\ [^?]+\.php[?\ ] [NC]
41+
RewriteRule \.php$ - [NC,L,F,R=404]
3742
</IfModule>

app/.htaccess

-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
<LimitExcept GET>
2-
<IfModule !mod_authz_core.c>
3-
Order Allow,Deny
4-
Deny from all
5-
</IfModule>
6-
<IfModule mod_authz_core.c>
7-
Require all denied
8-
</IfModule>
9-
</LimitExcept>
101
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
112
<IfModule !mod_authz_core.c>
123
Order Allow,Deny

app/content/.htaccess

-27
This file was deleted.

app/importer/jobs/.htaccess

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
<FilesMatch "\.(txt)$">
2-
# Apache 2.2
3-
<IfModule !mod_authz_core.c>
4-
Order Allow,Deny
5-
Deny from all
6-
</IfModule>
7-
# Apache 2.4
8-
<IfModule mod_authz_core.c>
9-
Require all denied
10-
</IfModule>
11-
</FilesMatch>
1+
<IfModule !mod_authz_core.c>
2+
Order Allow,Deny
3+
Deny from all
4+
</IfModule>
5+
<IfModule mod_authz_core.c>
6+
Require all denied
7+
</IfModule>

content/.htaccess

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
<Files .*>
2-
# Apache 2.2
1+
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
32
<IfModule !mod_authz_core.c>
43
Order Allow,Deny
54
Deny from all
65
</IfModule>
7-
# Apache 2.4
86
<IfModule mod_authz_core.c>
97
Require all denied
10-
</IfModule>
11-
</Files>
12-
13-
SetHandler default-handler
8+
</IfModule>
9+
</FilesMatch>
10+
<IfModule mod_php7.c>
11+
php_flag engine off
12+
</IfModule>
13+
<FilesMatch ".+\.*$">
14+
SetHandler !
15+
</FilesMatch>
16+
<IfModule mod_rewrite.c>
17+
RewriteRule ^.*\.php$ - [F,L]
18+
</IfModule>

content/pages/.htaccess

-4
This file was deleted.

images/.htaccess

-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
<LimitExcept GET>
2-
<IfModule !mod_authz_core.c>
3-
Order Allow,Deny
4-
Deny from all
5-
</IfModule>
6-
<IfModule mod_authz_core.c>
7-
Require all denied
8-
</IfModule>
9-
</LimitExcept>
101
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
112
<IfModule !mod_authz_core.c>
123
Order Allow,Deny

importing/.htaccess

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<IfModule !mod_authz_core.c>
2-
Order Allow,Deny
3-
Deny from all
2+
Order Allow,Deny
3+
Deny from all
44
</IfModule>
55
<IfModule mod_authz_core.c>
6-
Require all denied
7-
</IfModule>
6+
Require all denied
7+
</IfModule>

0 commit comments

Comments
 (0)