expatcanuck — 2010-11-21T19:18:14-05:00 — #1
Is it possible to block links to .mp3 files (music I've written & created)
from 'pirate' sites and, if so, how?
(Or if someone could point me towards appropriate references / search terms --
my Google search results are not helpful.)
Here's a cPanel AWStats excerpt of sites / links I'd like to block:
Connect to site from
Links from an external page
mittineague — 2010-11-21T22:44:25-05:00 — #2
The term you are looking for is "hot-linking".
I guess the most common way might be to use Apache htaccess to restrict outside sites. But IMHO this has some limitations.
I think a better way (but a bit more involved) is to keep the files outside of the root folder and have the pages on your site set a SESSION. Instead of calling the files directly, call a file that checks for a valid SESSION and fetches the file if it's OK.