preventing hotlinking of images

Posted by AtoZ, 09-15-2007, 01:38 AM
The images I am trying to block are on page generated by a simple PHP script on my server. The offender has replicated what I am doing with ASP on their server. They are hotlinking to my images for the resulting page. They left my website's name on them, so they must think that giving credit is enough. Idiots. I'm going to be contacting them to stop but I also want to see if there is a way for me to prevent it from happening in the first place. I tried mod_rewrite... I know mod_rewrite works on my server because I've been using it for some other things. However, whenever I enable the above code (add it to the directives and restart apache - have also tried just putting it in a .htaccess file in the appropriate directory), I end up with images still being allowed on my domain and the other domain I'm trying to stop from using my images. Do you think it could have to do with an absent referrer? I read that the code doesn't work if the referrer is blank. What else would cause this not to work? Obviously the domain would have to be correct, but it doesn't block from my domain OR the offending domain. I tried another method: This one blocked images to the offending domain, but it also blocked mine!

Posted by dynawebd, 09-15-2007, 03:16 PM
Try here http://altlab.com/htaccess_tutorial.html

Posted by AtoZ, 09-15-2007, 03:51 PM
That tutorial isn't really different than the other tutorials on the topic. I did try the code that will block only the sites you list and allow all others. This resulted in blocking ALL traffic to my domain. Access to even the html pages was forbidden.

Posted by david510, 09-16-2007, 03:19 AM
Try the below.

آیا این پاسخ به شما کمک کرد؟

 پرینت این مقاله

در همین زمینه

Reselling SSL certificates

Posted by luxor, 09-28-2001, 11:11 AMHi: Does anyone know which company is the most...

Linux: backup hard drive mounted to /backup

Posted by UberTricep, 11-10-2012, 07:49 AMI have a new dedicated server and I ordered a backup...

ereg allow space? Simple for those who understand it

Posted by lexington, 09-21-2008, 10:46 PMI do not think I will ever fully understand ereg, eregi,...

RAID 5 or RAID 10 - Which is the best?

Posted by wolfdog, 04-19-2009, 08:48 AMHi, The answer to my previous seems to HARDWARE RAID...

Include and run a script within a program

Posted by Sammyboy99, 02-18-2011, 06:53 PMSo I've made a program that executes a script the only...