MODX Community

Control access to the assets/ folder

Hello, is there a way to block the public access to the assets/ folder?
If anyone type in the browser site.com/assets/ they will see a list of folders and content inside assets/
and users will be able to navigate trough all the content, I think that is a security risk.
What is the best way to control the access to that folder without affecting the web links and performance?

Thanks.

1 Like

Apache webserver I presume?

That’s called the Directory Index and can be disabled by adding the following to your .htaccess file:

Options -Indexes
1 Like

Markh mate excellent. Problem solved, thank you very much!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.