This is what I worked for me, this is .htaccess inside the folder that I donβt want everyone to be able to list, but if I give them a link to the file inside, I want anyone (everyone) to be able to download the link.
allow from all Options -Indexes <Files *> deny from all allow from all Options -Indexes </Files> <Files .> Order Deny,Allow Deny From All Allow From xx.xx.xx.xx
source share