Skip to content

Commit 2fdbbb9

Browse files
addison74elidrissidev
authored andcommitted
Create/Update .htaccess file in skin and media directories (OpenMage#2289)
1 parent de7b8cd commit 2fdbbb9

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

media/.htaccess

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Options All -Indexes
22

33
############################################
4-
## Disable PHP7/PHP8 code execution for media directory
4+
## Disable PHP code execution
55

66
<IfModule mod_php7.c>
77
php_flag engine 0
@@ -11,8 +11,11 @@ Options All -Indexes
1111
php_flag engine 0
1212
</IfModule>
1313

14-
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
15-
Options -ExecCGI
14+
############################################
15+
## Don't permit execution of CGI scripts
16+
17+
AddHandler cgi-script .php .pl .py .jsp .asp .sh .cgi
18+
Options -ExecCGI
1619

1720
<IfModule mod_rewrite.c>
1821

skin/.htaccess

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
############################################
2+
## Disable PHP code execution
3+
4+
<IfModule mod_php7.c>
5+
php_flag engine 0
6+
</IfModule>
7+
8+
<IfModule mod_php8.c>
9+
php_flag engine 0
10+
</IfModule>
11+
12+
############################################
13+
## Don't permit execution of CGI scripts
14+
15+
AddHandler cgi-script .php .pl .py .jsp .asp .sh .cgi
16+
Options -ExecCGI

0 commit comments

Comments
 (0)