How to prevent navigation via browser URL to my sites' "/content" directory?

You could add this line to your .htaccess if you are using that file.

Options -Indexes

the content folder is not a page that is rendered anywhere, creating a template for it doesn’t make sense. And if indexing is not disabled, the same is true for the assets folder as well.

Usually, a server should actually by default be configured so that is doesn’t allow directory indexing. But unfortunately, that is not always the case.

1 Like