MyBB Community Forums

Full Version: .htaccess questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a directory that has lots of .txt files in it. How will i stop users from going to domain.com/txtfiles/log.txt and viewing it?
You can use a 'deny from all' to stop that, but then they won't be viewable through the browser at all. Other than that, there's no real solution.
Change the permissions of the files in your cPanel.
Do what panda said if you want to hide them from browsers completely, if you just want to stop peoples from viewing dir use this code in httacess

Options -Indexes


It will give them 403 Forbidden error, but files still will be viewable by direct link.