Disable Directory Listing

How to disable the Directory Listing were everyone can see the folder and stuff?

i tried to add

Redirect 301 /old-url.html https://www.example.com/new-url.html

in the .htaccess file but this has no effect

Create an .htaccess file on root with this content

#Disable Directory Listings in this Directory and Subdirectories
Options -Indexes

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