L
L
leha782016-09-24 16:00:06
PHP
leha78, 2016-09-24 16:00:06

Is it correct to make such .htaccess settings?

RewriteEngine on

RedirectMatch 403 /\..*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

In the folder with .htaccess, with such settings, there is a php file with code. This file is callable. such as site.ru/uploads/test.php
Is it safe to store a file with code here with such htaccess settings, it is important that the code itself in php cannot be read.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2016-09-24
@leha78

One line in .htaccess is enough:
Can only be denied (filtered) for startups:
see here , section: " Permissions on folders and files "

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question