G
G
GoodPirojok2020-08-10 10:21:43
PHP
GoodPirojok, 2020-08-10 10:21:43

How to block access to folders and files or redirect a request?

Good morning, tell me such a moment
I have a folder system
When you request site / system
This folder opens in the browser and all files are visible.
Checking if($_REQUST['path'] === "system)and executing header("location:index.html")does not change anything and opens the folder when requested.
How to solve the problem with access to a folder and restricting access to some files, the rights to which will only have an administrator?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2020-08-10
@GoodPirojok

In this folder, create a file .htaccessand write in it
deny from all
. Even better, move the folder to a higher level so that it is not INSIDE your document_root, but NEXT to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question