Answer the question
In order to leave comments, you need to log in
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
In this folder, create a file .htaccess
and 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 questionAsk a Question
731 491 924 answers to any question