Skip to content

Commit 21f6183

Browse files
addison74elidrissidev
authored andcommitted
Small changes in .htaccess file /media directory (OpenMage#2280)
1 parent 3188830 commit 21f6183

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

media/.htaccess

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Options All -Indexes
2+
3+
############################################
4+
## Disable PHP7/PHP8 code execution for media directory
5+
26
<IfModule mod_php7.c>
3-
php_flag engine 0
7+
php_flag engine 0
8+
</IfModule>
9+
10+
<IfModule mod_php8.c>
11+
php_flag engine 0
412
</IfModule>
513

614
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
@@ -9,17 +17,19 @@ Options -ExecCGI
917
<IfModule mod_rewrite.c>
1018

1119
############################################
12-
## enable rewrites
20+
## Enable rewrites
1321

1422
Options +FollowSymLinks
1523
RewriteEngine on
1624

1725
############################################
18-
## never rewrite for existing files
26+
## Never rewrite for existing files
27+
1928
RewriteCond %{REQUEST_FILENAME} !-f
2029

2130
############################################
22-
## rewrite everything else to get.php
31+
## Rewrite everything else to get.php
32+
33+
RewriteRule (.*) ../get.php [L]
2334

24-
RewriteRule .* ../get.php [L]
2535
</IfModule>

0 commit comments

Comments
 (0)