Re: [CODE4LIB] external linking to your images

2006-03-31 Thread David Pattern
Hi Eric

I'm a little rusty on Apache's Rewrite rules, but here's what I've got
set up in a .htaccess file (see
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html):

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://216.239.*/.*$  [NC]
RewriteCond %{HTTP_REFERER} !^http://216.239.*$  [NC]
RewriteCond %{HTTP_REFERER} !^http://66.102.9.*$  [NC]
RewriteCond %{HTTP_REFERER} !^http://66.102.7.*$  [NC]
RewriteCond %{HTTP_REFERER} !^.*melanson.*$  [NC]
RewriteCond %{HTTP_REFERER} !^.*mindjack.*$  [NC]
RewriteCond %{HTTP_REFERER} !^.*google.*$  [NC]
RewriteCond %{HTTP_REFERER} !^http://daveyp.com/.*$  [NC]
RewriteCond %{HTTP_REFERER} !^http://daveyp.com$  [NC]
RewriteCond %{HTTP_REFERER} !^http://www.daveyp.com/.*$  [NC]
RewriteCond %{HTTP_REFERER} !^http://localhost/.*$  [NC]
RewriteCond %{HTTP_REFERER} !^http://www.daveyp.com$  [NC]
RewriteCond %{HTTP_REFERER} !^.*gordian.*$  [NC]
RewriteRule (.*)\.(jpg)$ http://www.daveyp.com/cgi-bin/no.pl?$1.$2
[R,NC]

The gist of the above is:

1) if no HTTP_REFERER string is sent (!^$), then allow them to see the
image
2) if any of the remaining RewriteCond's match the HTTP_REFERER, then
allow them to see them image
3) otherwise if the user is asking for a .jpg file, perform the
RewriteRule

I've used a Perl script (no.pl) to decide which image to send to the
user, but you could easily use something like the following to redirect
to a static image file:

RewriteRule (.*)\.(jpg)$ http://www.daveyp.com/no.png [R,NC]

Basically, my site is daveyp.com so that's a valid HTTP_REFERER and the
others are sites that I'm happy to use my images.

I'm no expert on Rewrites, so there might be an easier way of doing it.

Hope that helps!
Dave


> -Original Message-
> From: Code for Libraries [mailto:[EMAIL PROTECTED] On
> Behalf Of Eric Lease Morgan
> Sent: 31 March 2006 13:59
> To: CODE4LIB@listserv.nd.edu
> Subject: Re: [CODE4LIB] external linking to your images
>
>
> On Mar 31, 2006, at 7:37 AM, David Pattern wrote:
>
> > If I were you, I'd replace your "first home" picture with
> one showing
> > a condemned property
>
> I thought of this but I also thought it might be sort of rude
> on my part.
>
>
> > If you have admin access, then you can usually set up rules
> to limit
> > which referring sites can directly use your images.
>
> Can you ore someone else here on this list be more specific
> about rules and referring sites? How do I configure Apache to
> do such a thing? Maybe I could get trickier and redirect such
> links to a donation page, or I could authorize certain links
> and not others, but now it is probably getting more
> complicated than it needs to be.
>
> --
> Eric Morgan
>

This transmission is confidential and may be legally privileged. If you receive 
it in
error, please notify us immediately by e-mail and remove it from your system. If
the content of this e-mail does not relate to the business of the University of
Huddersfield, then we do not endorse it and will accept no liability.


Re: [CODE4LIB] external linking to your images

2006-03-31 Thread Eric Lease Morgan

On Mar 31, 2006, at 7:37 AM, David Pattern wrote:


If I were you, I'd replace your "first home" picture with one
showing a
condemned property


I thought of this but I also thought it might be sort of rude on my
part.



If you have admin access, then you can usually set up rules to limit
which referring sites can directly use your images.


Can you ore someone else here on this list be more specific about
rules and referring sites? How do I configure Apache to do such a
thing? Maybe I could get trickier and redirect such links to a
donation page, or I could authorize certain links and not others, but
now it is probably getting more complicated than it needs to be.

--
Eric Morgan


Re: [CODE4LIB] external linking to your images

2006-03-31 Thread David Pattern
Hi Eric

If I were you, I'd replace your "first home" picture with one showing a
condemned property (e.g.
http://www.annistonstar.com/gallery/2004/year_end/2004_sg45.jpg) so that
it appears on their web site.

If you have admin access, then you can usually set up rules to limit
which referring sites can directly use your images.

In my spare time I run a fairly popular DVD site and I often get ebay
vendors linking directly to DVD cover scans.  So, I set up an Apache
rule that should replace the image with one that suggests that if the
vendor is happy to steal someone else's bandwidth they might also by
happy to steal your money :-)

regards
Dave Pattern
Library Systems Manager
Computing & Library Services
University of Huddersfield



> -Original Message-
> From: Code for Libraries [mailto:[EMAIL PROTECTED] On
> Behalf Of Eric Lease Morgan
> Sent: 31 March 2006 13:08
> To: CODE4LIB@listserv.nd.edu
> Subject: Re: [CODE4LIB] external linking to your images
>
> Yep, this is exactly what is happening.
>
> People are linking to images directly from my site. They are
> sort of "hijacking" the images, and when loaded they use my
> hard disk, my processing power, and my network connection to
> make it happen. This reduces the amount of resources for my
> machine's more primary tasks. Mind you, it would be difficult
> for me to measure the resource usage, and as a librarian, I
> might say, "So what?" On the other hand sometimes people make
> fun of me and my images. Other times the images are put into
> an undesirable context too gross to even mention on a mailing list.
>
> Here is a less inocuous instance. Below is a URL. It
> describes some sort of mortgage service. On the page is a
> picture of a house. I took that picture and titled it "first
> home". When you search Google Images for "first home" this
> picture shows up as item #2:
>
   http://www.dynastymortgageteam.com/

To what degree are the people at dynastymortgageteam.com taking
advantage of me and the system? To what degree are the norms of Internet
behavior too new to determine the answer to that question? What about
those other people who link to me for "personal use?" While it isn't
scholarship, maybe I should be "cited" and have a link back to my home
page and be granted attribution. Does anybody else remember an Internet
adage that said, "If you don't want it copied, then don't put it on the
Internet."

These are things I wonder about.

Finally, I consider refusing to serving images to external referrer's,
but again, some of my professional ethics get in the way. (BTW, how
would I go about doing such a thing?)

--
Eric Morgan

This transmission is confidential and may be legally privileged. If you receive 
it in
error, please notify us immediately by e-mail and remove it from your system. If
the content of this e-mail does not relate to the business of the University of
Huddersfield, then we do not endorse it and will accept no liability.


Re: [CODE4LIB] external linking to your images

2006-03-31 Thread Eric Lease Morgan

On Mar 31, 2006, at 12:44 AM, Jonathan Rochkind wrote:


Those hypothetical teenage girls could have copied the image
files and put them on their own web server. Instead, they
are linking directly to the image files on Eric's server.
Either way it would be a use of Eric's intellectual property
(if it is his!); either way it would be allowed 'personal
use' under Roy's policy for use of his IP.  But if so many
people are linking to your files on your server (for their
own purposes that have nothing to do with yours), that it
causes bandwidth or CPU problems for you, that's what I'd be
concerned about. They're kind of using your hardware as
their own personal web server.

Many websites will refuse to serve images to a request with an
external referrer for just this reason.



Yep, this is exactly what is happening.

People are linking to images directly from my site. They are sort of
"hijacking" the images, and when loaded they use my hard disk, my
processing power, and my network connection to make it happen. This
reduces the amount of resources for my machine's more primary tasks.
Mind you, it would be difficult for me to measure the resource usage,
and as a librarian, I might say, "So what?" On the other hand
sometimes people make fun of me and my images. Other times the images
are put into an undesirable context too gross to even mention on a
mailing list.

Here is a less inocuous instance. Below is a URL. It describes some
sort of mortgage service. On the page is a picture of a house. I took
that picture and titled it "first home". When you search Google
Images for "first home" this picture shows up as item #2:

  http://www.dynastymortgageteam.com/

To what degree are the people at dynastymortgageteam.com taking
advantage of me and the system? To what degree are the norms of
Internet behavior too new to determine the answer to that question?
What about those other people who link to me for "personal use?"
While it isn't scholarship, maybe I should be "cited" and have a link
back to my home page and be granted attribution. Does anybody else
remember an Internet adage that said, "If you don't want it copied,
then don't put it on the Internet."

These are things I wonder about.

Finally, I consider refusing to serving images to external
referrer's, but again, some of my professional ethics get in the way.
(BTW, how would I go about doing such a thing?)

--
Eric Morgan