Protecting uploads not working

I am trying to build a private site. One of the most important aspects of the site consists in the uploads, and they definitely need to be private.

I found a very interesting topic on that here: How to Protect Uploads, if User is not Logged In? but it is impossible for me to comment / answer because I am newbie on this forum (1st question btw). Therefore, I post my question in this new topic.

The thing is that this solution does not work for me, and I do not know why. For the moment, I am trying my website on my computer, with an apache server. I put my .htaccess just here:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^wp-content/uploads/(.*)$ dl-file.php?file=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

and the dl-file.html, as given here:

my uploads are located either just under /wp-content/uploads or in a subdirectory of this directory. I would like to know if there is a way of diagnosing, or see where the does the problem come from. I have deactivated all the plugins, in vain.

Solutions Collecting From Web of "Protecting uploads not working"

And the culprit was… my apache config. Please do not forget to edit the apache configuration in /etc/apache2/apache2.conf and add the lines

<Directory /var/www/html/>
    AllowOverride All

I still have a question. It seems (but it may be related to the fact that the site is still in localhost) that this method does not prevent from downloading using curl for instance. Am I right?