I want to prevent users from hotlinking my shared files, but I could not manage to do it in my .htaccess file, because links end with /download, not .zip or .rar. How can I do that?
I tried this but didn’t work.
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?example.com [NC]
RewriteRule (download)$ https://example.com/dontcopy.png [NC,R,L]
I don’t know how RewriteRule will apply to files without an extension, which is this case. Please somebody help me!