I want to prevent hotlinking to all subfolders in /var/www/store
but at the same time allow linking to its index page. I tried doing this:
<Directory "/var/www/store">
DirectoryIndex index.html
</Directory>
<Directory "/var/www/store/*">
SetEnvIfNoCase Referer ^http://example.com/ accept
Require env accept
</Directory>
But the index.html is forbidden when I tried accessing from a link outside. Next I tried appending a trailing slash.
<Directory "/var/www/store/*/">
It doesn't work too. Is this a bug in Apache? Ain't the <Directory>
directive supposed to match directories only?