Forum Moderators: phranque

Message Too Old, No Replies

.htaccess file anti-leech

         

webviz

12:30 am on Aug 12, 2006 (gmt 0)

10+ Year Member



Hello everyone! I have four servers which hosts bunch of zip files. I only want people downloading that came form my domain name (www.my-site.com). So if someone does link to my file it would redirect the user to my website. How is this done?

Also, is there a way to setup a limit on the number of connections to the server per user? So a person can only download ONE file at once?

Also, one more thing. Is there a way that I could mast the direct path to the file which the user is downloading? Have it to be something like: [domain.com...] insted of the real path which would be: [domain.com...]

Thanks and I look forward to reding your replies.

jdMorgan

4:25 am on Aug 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello everyone! I have four servers which hosts bunch of zip files. I only want people downloading that came form my domain name (www.my-site.com). So if someone does link to my file it would redirect the user to my website. How is this done?

See this search [google.com] for about 300 previous threads on hotlinking - essentially the same problem.

Also, is there a way to setup a limit on the number of connections to the server per user? So a person can only download ONE file at once?

Yes, but you'll need a script and at least a crude database to do this. And it will work only if the visitor is at a fixed IP address -- i.e. it won't work with AOL users and others whose IP addresses really belong to caching-proxy 'gateways' which surround AOL's network -- and other networks similar to AOL's.

Also, one more thing. Is there a way that I could mast the direct path to the file which the user is downloading? Have it to be something like: http://www.example.com/file.zip insted of the real path which would be: http://www.example.com/downloads/cat/file.zip.

Again yes, you can use mod_rewrite or a script to do this. Start with the search above, as some of those threads also address this issue.

Jim

[edited by: jdMorgan at 4:26 am (utc) on Aug. 12, 2006]

webviz

2:10 am on Aug 14, 2006 (gmt 0)

10+ Year Member



OK, I've found the solutions to my first two questions, but I havn't found a solutuon to my third question. How do I mask download paths? I have a server with 500 zip files on it. I want to link people to the files to download it, but I don't want to display the direct path of the file (so people can't wget the file or anything.) This is what I am loooking for:

The real path to the file: [domain.com...]

But I want it so say: [domain.com...] when the user is downloading so no one ever knows the direct path.

I want to do this without PHP, just server related things. Now how would this be done?

jdMorgan

2:20 am on Aug 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP or PERL, otherwise the "pseudo-link" is every bit as usable as the real link.

Jim