Search code examples
assetsmodxmodx-revolution

How to block access to the site directory through the browser?


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


Solution

  • 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