Using htaccess I’m basically trying to forbid access to the page i.e http://example.com, but it will still allow people to download files if they have a direct link i.e http://example.com/hi.zip.
I’m using the directory directive to display the basic download page. According to here mod_autoindex.c is used,so basically what I’m trying to do is:
<Files mod_autoindex.c>
AuthType Basic
AuthName "Example"
AuthUserFile "/home/.htpasswd"
require valid-user
</Files>
Any advice/tips?
This should work (tested on my webserver: http://www.gopeter.de/test is restricted, http://www.gopeter.de/test/test.zip is allowed)