0

I have set up an FTP connection via ShareX to upload my screenshots to my own ftp.

So my screenshots are accessible at the url 'screenshots.mydomain.fr/myscreenshothash.png'.

And that's cool! But according to the url 'screenshots.mydomain.fr' you can see the list of all my screenshots (the page Index of). And I'd like to block this page via an htpasswd without blocking access to the files ('screenshots.mydomain.fr/myscreenshothash.png')

What can I do?

My current .htaccess

AuthUserFile /home/XXL /.htpasswd
AuthGroupFile /dev/null
AuthName "Accès Restreint"
AuthType Basic
require valid-user
  • You should be able to take some inspiration here from https://stackoverflow.com/questions/14603568/password-protect-a-specific-url – CBroe Feb 19 '21 at 09:14

1 Answers1

0

For the moment I have added a

Options -Indexes

in my htaccess to prevent access to the index of page and I made a listing of my files in a index.php files placed in a subfolder (in which I put the htaccess with htpasswd)