I'm creating a VM for my students to hack into, however the directory containing .htaccess is hiding the directory they need to access to CTF. The only way you can find this directory is if you specify it in the url (not even spidering will help). Any advice would be greatly appreciated My .htaccess is as follows

IndexOptions ShowForbidden
Options + Indexes
AllowOverride All
AuthType Basic
AuthName "For ashton's eyes only"
AuthUserFile /etc/apache2/.htpasswd
require user ashton
Options + Indexes```


The .htaccess file looks ok. Is there an index file (like index.html or index.php or something like that) in the directory where the .htaccess file resides? If so, then browsing to that path will show the index file rather than the folder listing. If you don't need the index file for anything, just remove it from that directory.

I don't think this is related but it looks like you have a superfluous line in the .htacess file - the last line of the file with "Options + Indexes```"

Not the answer you're looking for? Browse other questions tagged or ask your own question.