|
| Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Guest
Posts: n/a
|
How do I stop others from leeching my files?
Create an .htaccess file. See instructions for this in our FAQ section as well as on our support pages.
In your .htaccess file, place the following: <Limit GET POST> order allow,deny deny from host.to.deny # This will deny access from that host deny from 0.0.0.0 # This will deny a full IP deny from 0.0.0. # This will deny from that particular subnet allow from all </Limit> |
|
|
#2 |
|
Guest
Posts: n/a
|
What if you want to deny all leeching from every site but your own?
|
|
|
#3 |
|
Join Date: Jan 2002
Posts: 949
Reputation: 5
|
it's been said before, but...
I know these questions come up over and over and the answers are all here in the forums, but for the new people asking those same questions again, here are a couple of more tips I found in these Forums that were very useful. Thanks to those that originally posted them here.
When you are new, everything is difficult. EZPass was mentioned in another thread, and even I was able to make it work to create .htaccess files to protect certain directories on my website. But for a really easy way, check out Lockit. I dont think anything could be easier with it's friendly interface, automatic detection of paths and placement of the .htaccess and .htpasswd files. Yes, and it's free, but does not support multiple user/password sets. (EZPass does) Its just for one user. Still, it can get a newbie protected as simply as anything I tried. It can be found at http://www.highlandmedia.com/Downloads/LockIt.shtml Now, imagine my surprise when I found that I could still directory browse after putting .htaccess files in my picture directories. Another newbie mistake. .htaccess only causes a password call for entry through the front door, not the back. Again, the Forums gave Me the answer to help. Place a blank index.html page in the directory with the pictures and now directory browsing is stopped. I am sure this is not high security, but it will discourage most intruders, I think. I actually put a little warning about trespassing on that "blank" index.html page for a more official sounding deterrent. Hope that helps some of you. Dale |
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
That's not what I'm talking about. I don't care about the password in this case. Just denying my files from being downloaded or viewed from anywhere but my site.
|
|
|
#5 |
|
¤¤¤¤¤¤
Join Date: Jan 2002
Location: Right in front of you
Posts: 542
Reputation: 5
|
This is what I have in my .htaccess file....
<Limit GET POST> order allow,deny deny from http://www.masalatalk.com/ deny from 64.246.15.39 deny from 64.246.6.47</Limit> Now I keep getting 500 internal error ! |
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
Stop Leeching
this problem is becoming more and more prevelant....
check out this link.... there are several programs there to prevent leaching.... http://www.hotscripts.com/Perl/Scrip...urity_Systems/ hope this helps |
|
|
#7 | |
|
Never!!
Join Date: Jan 2002
Location: Chiang Mai, Thailand (Paradise)
Posts: 184
Reputation: 5
|
Re: 500 Internal error !
Quote:
You need to change your format, and I don't think you can deny a www address- I belive it must be an IP address For example, here's mine.. <Limit GET PUT POST> order allow,deny allow from all deny from 68.36.66.114 66.20.176.37 61.5.41.43 209.152.113.245 </Limit> Make sure each address is seperated by a space, to signal a new address |
|
|
|
|
|
#8 |
|
Guest
Posts: n/a
|
Lockit doesn't seem to be available anymore................
|
|
|
#9 |
|
Guest
Posts: n/a
|
couldn't the reverse be used if you only want pics displayed on your own site.....??
<Limit GET PUT POST> order allow,deny deny from all allow from (your site) </Limit> |
|
|
#10 | |
|
Guest
Posts: n/a
|
Quote:
<Files *.gif> Order Allow, Deny Deny from all Allow from .yoursite.com </Files> I've tested this and it works great. Hope this helps! |
|
|
|
#11 |
|
Guest
Posts: n/a
|
Nice!
![]() |
|
|
#12 |
|
¤¤¤¤¤¤
Join Date: Jan 2002
Location: Right in front of you
Posts: 542
Reputation: 5
|
Not working for me
<Files *.jpg>
Order Allow, Deny Deny from all Allow from .indianceleb.com </Files> Gives me 500 Internal server error, Once it worked but then I was not able to see my own *.jpg Images. HELP ! |
|
|
|
|
#13 |
|
Guest
Posts: n/a
|
Make sure that this is at the top of the .htaccess file. I set mine up and it works.
<Files *.jpg> Order Allow, Deny Deny from all Allow from .manninc.com </Files> Some times it wants to work, other times it doesn't. Don't really know why. Hope this helps! On a side note, Jedd's suggestion above works (with a slight adjustment): <Limit GET POST> order allow,deny deny from all allow from .yoursite.com </Limit> This solution might actually work better than the one I suggested. |
|
|
#14 |
|
Guest
Posts: n/a
|
Well those solutions worked for a little while and than fizzed out. Here's another setup, one I've used in the past and it still works:
RewriteCond %{HTTP_REFERER} !^http://yoursite.com/ [NC] # and not my site RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/ [NC] # and not my site RewriteRule [^/]+.(gif|jpg)$ - [F] # No access to images RewriteRule ^/cgi-bin/.+$ - [F] # No access to CGIs Hope this helps! |
|
|
#15 |
|
Never!!
Join Date: Jan 2002
Location: Chiang Mai, Thailand (Paradise)
Posts: 184
Reputation: 5
|
Rube Goldberg lives!
![]() |
|
|
|
|
#16 |
|
¤¤¤¤¤¤
Join Date: Jan 2002
Location: Right in front of you
Posts: 542
Reputation: 5
|
This is working for me ... Yee haw !
![]() RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC] RewriteRule .*\.(gif|GIF|jpg|JPG)$ http://www.yourdomain.com/bad.gif [R] <Files *.jpg> Order allow,deny deny from .domain1.com deny from .domain2.com deny from 64.246.15.39 deny from 64.21.143.17 allow from all </Files> |
|
|
|
|
#17 |
|
Guest
Posts: n/a
|
The code I posted is much simplier and blocks all access to any gif or jpg image on your site from any site other than your own. This prevents any sites from leeching your images. Therefore, the extra coding is not necessary.
Hope this helps! |
|
|
#18 |
|
Guest
Posts: n/a
|
To test your anti-leech code, you can head over to http://www.hotlinking.com
|
![]() |
| Thread Tools | |
|
|