Page 1 of 2

Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Thu Jul 10, 2003 11:14 am
by syntax53
I'm going to add a downloads section to mudinfo.net but I wanted to prevent ppl from linking directly to the downloads off of their site. I've tried a few things but was wondering if anyone already figured out a good way to do it.



-syn

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Thu Jul 10, 2003 11:22 am
by Raybdbomb
anti-leech

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Thu Jul 10, 2003 12:58 pm
by syntax53
n/m i figured it out by using a .htaccess file.



try it: http://www.mudinfo.net/downloads/b2h_v2.3.0.4.zip



here's the file i made incase anyone else wanted to do it. note, this requires apache with support for mod_rewrite:





RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com/.*$ [NC]

RewriteRule \.(zip|exe)$ http://www.yoursite.com/pathto/errorpage.html [R,L]





(yes i know you can just copy the url and paste it, but that's ok)

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Thu Jul 10, 2003 4:33 pm
by War Hawk
hrm..... could have done it in php I Think too....

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Thu Jul 10, 2003 4:42 pm
by Raybdbomb
oh yeah forgot about that...



it's pretty easy to do with php



however, warhawk, it's quite easy to trace where the dl's are comin from if you do it with php

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Thu Jul 10, 2003 4:49 pm
by War Hawk
no its not :) You obviously don't know how to write php then.... You can hide so much info in php.....

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Thu Jul 10, 2003 5:50 pm
by Raybdbomb
setup a page with a download that you think i can't get the direct link for war hawk

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Thu Jul 10, 2003 6:21 pm
by Raybdbomb
god damnit, now i can't find the tracer...



as soon as i get it again i'll tell you, k? :P

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Thu Jul 10, 2003 10:03 pm
by iNViSiGOD
PHP is messy at best tho.

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Posted: Fri Jul 11, 2003 3:21 am
by Raybdbomb
and sloppy at worst?