How do I make it so folders show error message?

Avatar
  • Answered
How do I make it so folders show error message?

Currently, if someone goes to mydomain.com/video, they see all my files in my video directory. I want them to see a an error message, unless they have the exact url. How do I make this happen?

Thank you,
Avatar
Arn
Hello Chrismg, You need to add this line to your .htaccess file (hidden file in your public_html folder): Options All -Indexes You can access your .htaccess file by using the file manager in cpanel. Remember to check off SHOW HIDDEN files, otherwise, you won't see it. Here's a link for this: Using your File Manager to show hidden files If you have any further questions, please contact technical support or leave a comment at the bottom of the page. Regards, Arnel C.