-1

Good afternoon, how to close the root of the project from sharing through the browser? directory visible

How to make a message about unavailability when trying to go to the root of the site through a browser, like here, and how to do it with modx tools?

to be so

jps
  • 20,041
  • 15
  • 75
  • 79

1 Answers1

0

add next to .htaccess file:

<Files ~ "\assets$">  
 Order Allow,Deny  
 Deny from All  
</Files>

alternatively, you could use

Options -Indexes

into .htaccess inside assets folder

Anton Tarasov
  • 534
  • 1
  • 7
  • 16
  • "Order Allow,Deny Deny from All" - This command hides the folder from external access, and also, some types of files, for example - ".pdf", become inaccessible. But ".jpg" files are still opened by direct link, as well as ".word" or ".rar" are downloaded. But "Options -Indexes" work well - what i need, thanks – AlexandrZalamay Jan 24 '22 at 12:14