Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

I'm big in Japan! How can I do this redirect/rewrite with Downloads Pepper?

stormy
Minted
Posted on Jan 10, '08 at 08:50 am

Thanks to implementing the .htaccess method of tracking downloads with Downloads pepper, and some digging into my Awstats, I’ve found that I’m getting a lot of downloads of a specific song from Japan.

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 several different mp3 sites.

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? (and track all this via Downloads pepper)

xul
Minted
Posted on Jan 10, '08 at 09:25 am

this htaccess code worked for me:

RewriteEngine on

RewriteCond %{HTTP_REFERER} ^http://.*example.org.*$ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://.*example.net.*$ [NC] RewriteRule ^(.*)$ http://example.com/mp3/ [R,L]

http://httpd.apache.org/docs/2.2/mod/mo … ewriterule

You must be logged in to reply. Login above or create an account