Preventing Direct Downloads [Archive] - ForumsHQ

syntax53
Posts: 0
Joined: Wed Apr 03, 2002 6:00 am

Preventing Direct Downloads [Archive] - ForumsHQ

Post 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
Raybdbomb
Posts: 0
Joined: Wed Mar 21, 2001 6:00 am

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Post by Raybdbomb »

anti-leech
syntax53
Posts: 0
Joined: Wed Apr 03, 2002 6:00 am

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Post 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)
War Hawk
Posts: 0
Joined: Thu Mar 07, 2002 6:00 am

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Post by War Hawk »

hrm..... could have done it in php I Think too....
Raybdbomb
Posts: 0
Joined: Wed Mar 21, 2001 6:00 am

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Post 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
War Hawk
Posts: 0
Joined: Thu Mar 07, 2002 6:00 am

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Post by War Hawk »

no its not :) You obviously don't know how to write php then.... You can hide so much info in php.....
Raybdbomb
Posts: 0
Joined: Wed Mar 21, 2001 6:00 am

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Post by Raybdbomb »

setup a page with a download that you think i can't get the direct link for war hawk
Raybdbomb
Posts: 0
Joined: Wed Mar 21, 2001 6:00 am

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Post by Raybdbomb »

god damnit, now i can't find the tracer...



as soon as i get it again i'll tell you, k? :P
iNViSiGOD
Posts: 0
Joined: Wed Jul 10, 2002 5:00 am

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Post by iNViSiGOD »

PHP is messy at best tho.
Raybdbomb
Posts: 0
Joined: Wed Mar 21, 2001 6:00 am

Re: Preventing Direct Downloads [Archive] - ForumsHQ

Post by Raybdbomb »

and sloppy at worst?
Post Reply

Return to “General Computing Talk”