Web Hosting Talk







View Full Version : How to reject someone linking my pics?


Gary0704
12-16-2001, 04:38 AM
Hi,

I found some websites link to some pics from my server.
Can I reject them to link my pics by .htaccess? (I only want to
reject some websites, not all websites), can someone show me
how to use .htaccess?
thanks!


Gary

shortfork
12-16-2001, 06:07 AM
Slap this puppy in your web folder.. in a file named .htaccess


SetEnvIfNoCase Referer "^http://www.youdomain.com/" local_ref=1
<FilesMatch ".(gif|jpg)">
Order Allow,Deny
Allow from env=local_ref
</FilesMatch>

that'll do it..

Shortness

ljprevo
12-16-2001, 02:39 PM
You could do that, then rename them. :D

shortfork
12-16-2001, 10:00 PM
Originally posted by ljprevo
You could do that, then rename them. :D

Why would you need to rename them?

I did it with on one of my hosted sites due to a warez site linking their box art (stupid, led me right to them) once the files are denied, they just get a red box instead of an image. Did not have to rename anything.

Shortness

AbbasJaffarali
12-17-2001, 05:28 AM
Does this need to go in every sub-folder that has pics as well, or will the root folder take care of all sub-directories?

Thanks
Abbas

Seer
12-17-2001, 06:58 AM
Thanks, I can use this one. My server logs are filled with requests from images.google.com and a bunch of other image search engines. Not so sure I like that idea.

SetEnvIfNoCase Referer "^http://www.youdomain.com/" local_ref=1

Only problem with that line is if your domain is accessed without the "www." the images won't show.

microsol
12-17-2001, 10:58 AM
Originally posted by Seer
Thanks, I can use this one. My server logs are filled with requests from images.google.com and a bunch of other image search engines. Not so sure I like that idea.

SetEnvIfNoCase Referer "^http://www.youdomain.com/" local_ref=1

Only problem with that line is if your domain is accessed without the "www." the images won't show.

I did not try this but why don't you put a second line in and see if it works:
SetEnvIfNoCase Referer "^http://yourdomain.com/" local_ref=1

Seer
12-17-2001, 03:59 PM
Originally posted by microsol


I did not try this but why don't you put a second line in and see if it works:
SetEnvIfNoCase Referer "^http://yourdomain.com/" local_ref=1


I tried that one for the hell of it. Everything worked, except my rollover images. :eek:
I'm probably just missing something.

cmoats
12-17-2001, 04:23 PM
You have to be real careful with you images. Virtual
companies will download them and put them on their website.
This way it looks like they have a real NOC. We had a few virtual
companies do that to us.

EnigmaBiz
02-01-2002, 03:04 AM
Originally posted by cmoats
You have to be real careful with you images. Virtual
companies will download them and put them on their website.
This way it looks like they have a real NOC. We had a few virtual
companies do that to us.

Based on my logs I actually have 2 sites, maybe by the same guy that has *.cbj domain. One of them freebies ones.

Two sites point straight into mine, stealth or was it just pure re-direct. I am not saying anything because I am gettings hits, hits are good unless he takes it like he designed it.

That reminds me to go check my logs.

I wonder how cobalt web stats compare to the webalizer redhat 7.x I used before... might be the same..

adad
02-03-2002, 06:43 AM
Have a look a this thread. ;)

http://www.webhostingtalk.com/showthread.php?threadid=29981&highlight=rewriteengine+rewriterule+rewritecond

Daniel