![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hi, I posted a query about this on alt.html a couple days ago, but no one responded. I realize it's OT here, but folks here have been so helpful in the past I'm hoping there's someone who might know the answer. Thanks for indulging me. There's one website that repeatedly hotlinks to my images; one image alone hass gotten 1351 hits from their website in the past 6 days. (Imagine what that number will be by end of month.) I'd like to block that site (but not all sites) from linking to my images. Is there a way? I did find this code online - the website it was on claimed it would help. But it doesn't work; it also blocks some images from my own site! I found some variations on this code on other sites & couldn't get them to work either. What am I doing wrong? I'm so confused. RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} ^http://(www\.)?badsite.com.*$ [NC,OR] RewriteRule \.(gif|jpg)$ http://www.mywebsite.com/images/hotlink.gif [R,L] Also, is there a way that it can return an error rather than a 404 or a redirect to an alternate image? thanks so much! ~velvet~ |
#3
| |||
| |||
|
|
On Thu, 06 Oct 2005 22:12:47 GMT, "greenvelvet" <spam (AT) verizon (DOT) net wrote: hi, I posted a query about this on alt.html a couple days ago, but no one responded. I realize it's OT here, but folks here have been so helpful in the past I'm hoping there's someone who might know the answer. Thanks for indulging me. There's one website that repeatedly hotlinks to my images; one image alone hass gotten 1351 hits from their website in the past 6 days. (Imagine what that number will be by end of month.) I'd like to block that site (but not all sites) from linking to my images. Is there a way? I did find this code online - the website it was on claimed it would help. But it doesn't work; it also blocks some images from my own site! I found some variations on this code on other sites & couldn't get them to work either. What am I doing wrong? I'm so confused. RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} ^http://(www\.)?badsite.com.*$ [NC,OR] RewriteRule \.(gif|jpg)$ http://www.mywebsite.com/images/hotlink.gif [R,L] Also, is there a way that it can return an error rather than a 404 or a redirect to an alternate image? thanks so much! ~velvet~ Hi ya I had the same problem as you did. I got in touch with my hosting company and they have successfully stopped people hotlinking to me. They installed LeechBlocker.dll onto my site and that did the trick. |
|
hth plh Paul -- |
#4
| |||
| |||
|
|
"Paul" <webmaster (AT) houstoncrafts (DOT) com> wrote in message news:1r8bk19o47iuf0v8eje64vutibmlarm62g (AT) 4ax (DOT) com... On Thu, 06 Oct 2005 22:12:47 GMT, "greenvelvet" <spam (AT) verizon (DOT) net wrote: hi, I posted a query about this on alt.html a couple days ago, but no one responded. I realize it's OT here, but folks here have been so helpful in the past I'm hoping there's someone who might know the answer. Thanks for indulging me. There's one website that repeatedly hotlinks to my images; one image alone hass gotten 1351 hits from their website in the past 6 days. (Imagine what that number will be by end of month.) I'd like to block that site (but not all sites) from linking to my images. Is there a way? I did find this code online - the website it was on claimed it would help. But it doesn't work; it also blocks some images from my own site! I found some variations on this code on other sites & couldn't get them to work either. What am I doing wrong? I'm so confused. RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} ^http://(www\.)?badsite.com.*$ [NC,OR] RewriteRule \.(gif|jpg)$ http://www.mywebsite.com/images/hotlink.gif [R,L] Also, is there a way that it can return an error rather than a 404 or a redirect to an alternate image? thanks so much! ~velvet~ Hi ya I had the same problem as you did. I got in touch with my hosting company and they have successfully stopped people hotlinking to me. They installed LeechBlocker.dll onto my site and that did the trick. Thanks Paul. Does Leechblocker selectively block websites? There are some sites that I'm OK with linking to images on my site. It is just one or two that I'd like to block. ~ velvet ~ hth plh Paul |
#5
| |||
| |||
|
|
I did find this code online... RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} ^http://(www\.)?badsite.com.*$ [NC,OR] RewriteRule \.(gif|jpg)$ http://www.mywebsite.com/images/hotlink.gif [R,L] Also, is there a way that it can return an error rather than a 404 or a redirect to an alternate image? |
#6
| |||
| |||
|
|
greenvelvet wrote: I did find this code online... RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} ^http://(www\.)?badsite.com.*$ [NC,OR] RewriteRule \.(gif|jpg)$ http://www.mywebsite.com/images/hotlink.gif [R,L] Also, is there a way that it can return an error rather than a 404 or a redirect to an alternate image? This is a rule that you put into .htaccess, which is a configuration file for the Apache web server. If you're using IIS, this won't help you. I know nothing at all about IIS configuration. Which web server software are you using? RFM |
#7
| |||
| |||
|
|
The code did go into the .htaccess file. I tried variations of the code I posted before, all found on web searches, but they either blocked images from my own site (as well as those from others) or they didn't work at all. |
#8
| |||
| |||
|
|
greenvelvet wrote: The code did go into the .htaccess file. I tried variations of the code I posted before, all found on web searches, but they either blocked images from my own site (as well as those from others) or they didn't work at all. I redirect image requests that don't come from my own website. Hence, the rule looks like this: RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/.*$ [NC] Where "example.com" is my own website. This would replace the line in your example that matches with "badsite." Everything else looks fine to me. RFM |
#9
| |||
| |||
|
|
greenvelvet wrote: The code did go into the .htaccess file. I tried variations of the code I posted before, all found on web searches, but they either blocked images from my own site (as well as those from others) or they didn't work at all. I redirect image requests that don't come from my own website. Hence, the rule looks like this: RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/.*$ [NC] Where "example.com" is my own website. This would replace the line in your example that matches with "badsite." Everything else looks fine to me. RFM |
#10
| |||
| |||
|
|
On 6 Oct 2005 16:26:48 -0700, "Fritz M" <nospam (AT) masoner (DOT) net> wrote: greenvelvet wrote: The code did go into the .htaccess file. I tried variations of the code I posted before, all found on web searches, but they either blocked images from my own site (as well as those from others) or they didn't work at all. I redirect image requests that don't come from my own website. Hence, the rule looks like this: RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/.*$ [NC] Where "example.com" is my own website. This would replace the line in your example that matches with "badsite." Everything else looks fine to me. RFM Thing is, that only stops *that* site. What happens when another, and another, and another start doing it ? plh Paul |
![]() |
| Thread Tools | |
| Display Modes | |
| |