Forum Moderators: phranque
The link seems to be direct to the mp3 file so they don’t leave a referrer (or maybe they are blocking it), but it comes from what it seems to be several different portals from Japan.
The question is:
Using .htaccess, how can I allow downloads only if the referrer is my own site, and send visitors that are following a direct mp3 link from another site to my mp3 page?
I'm already using a rewrite rule to track Downloads with a Mint "pepper":
<FilesMatch "\.(mp3¦pdf)$">
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ http:// mysite.com/mint/pepper/tillkruess/downloads/tracker.php?uri=http://%{HTTP_HOST}%{REQUEST_URI}&force
</FilesMatch>
This rule sends all mp3/pdf files through the tracker and forces a download. I suppose I should add some rules before that but I don't know enough about it...
Here are two typical methods in outline form:
Jim