Skip to content

Small changes in .htaccess file /media directory #2280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions media/.htaccess
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Options All -Indexes

############################################
## Disable PHP7/PHP8 code execution for media directory

<IfModule mod_php7.c>
php_flag engine 0
php_flag engine 0
</IfModule>

<IfModule mod_php8.c>
php_flag engine 0
</IfModule>

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

############################################
## enable rewrites
## Enable rewrites

Options +FollowSymLinks
RewriteEngine on

############################################
## never rewrite for existing files
## Never rewrite for existing files

RewriteCond %{REQUEST_FILENAME} !-f

############################################
## rewrite everything else to get.php
## Rewrite everything else to get.php

RewriteRule (.*) ../get.php [L]

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