|
|
|
date: Fri, 28 Aug 2009 13:54:57 +0100,
group: uk.net.web.authoring
back
Image hotlinking affecting stats?
My highest reffering site to CrackGuitar for months has been this online
radio station 'Deezer' but I don't see why, the only full tracks on there
are guitar students first recordings etc. If Deezer is hotlinking an image
would that list on "Links from an external page"?
--
======= dE|_ =======
www.websitefoundry.co.uk
www.crackguitar.com
Fender~Photoshop~Markup
date: Fri, 28 Aug 2009 13:54:57 +0100
author: dE|_
|
Re: Image hotlinking affecting stats?
dE|_ wrote:
> My highest reffering site to CrackGuitar for months has been this
> online radio station 'Deezer' but I don't see why, the only full
> tracks on there are guitar students first recordings etc. If Deezer
> is hotlinking an image would that list on "Links from an external
> page"?
I'm not sure about that but the place where I am always able to spot it
is Cpanel's "Recent Visitors" log. I check the "Referer" field whenever
a single image is served
--
Red
date: Fri, 28 Aug 2009 11:54:51 -0700
author: Red E. Kilowatt
|
Re: Image hotlinking affecting stats?
On Fri, 28 Aug 2009 13:54:57 +0100, "dE|_"
wrote:
>My highest reffering site to CrackGuitar for months has been this online
>radio station 'Deezer' but I don't see why, the only full tracks on there
>are guitar students first recordings etc. If Deezer is hotlinking an image
>would that list on "Links from an external page"?
Del
I had a similar problem a few years back with a German Bassist using one of
my small images in his signature for all his (very frequent) forum
postings. This was determined by following the referrer information to see
where the link was from.
Initially I renamed the image on my site and in HTML references (easy with
Dreamweaver) then copied a Swastika image to the filename that he was
linking. That seemed to stop the links PDQ and when I checked the forums,
all of his posts had disappeared too, so that was satisfying.
I later fixed it properly with a .htaccess file using a rewrite rule for
all images, where the referrer wasn't from one of my domains. Basically:
# Enable Rewrite
RewriteEngine on
# Image theft rewrites
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png)$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !domain1name\.co\.uk [NC]
RewriteCond %{HTTP_REFERER} !domain2name\.co\.uk [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteRule (.*) /stolen_image.html?/$1 [R,NC,L]
Probably someone will now tell me that there are various errors in the
above, but they seem to work.
Richard
--
http://www.caravanningnow.co.uk
I'll never understand my neighbour. He has recently started
wheel-clamping his own caravan when he finds he has inadvertently
parked it in his own drive! I wonder if he is a sadist, a masochist or
both. Alan Thakray - Letters to Viz
date: Sat, 29 Aug 2009 19:16:49 +0100
author: Richard Cole lid
|
Re: Image hotlinking affecting stats?
Hi Richard..
On Sat, 29 Aug 2009 19:16:49 +0100, Richard Cole
<ispcrco@hotmail.com.invalid> wrote:
>I later fixed it properly with a .htaccess file using a rewrite rule for
>all images, where the referrer wasn't from one of my domains. Basically:
>
># Enable Rewrite
>RewriteEngine on
[ snip rules ]
>Probably someone will now tell me that there are various errors in the
>above, but they seem to work.
This would have just broken your site for me. Referrers are off by
default in my browser, so whether I was viewing a hotlinked image or
browsing your site legitimately.. the images wouldn't show up.
Relying on a referrer header is never a good idea, IMO.
Regards,
Ian
date: Sun, 30 Aug 2009 22:04:04 +0100
author: Ian.H
|
Re: Image hotlinking affecting stats?
In uk.net.web.authoring, Ian.H wrote:
>Relying on a referrer header is never a good idea, IMO.
You can just leave out the no referrer rule. It does allow a certain
amount of abuse, but it prevents the casual and accidental abuse which does
include referrers.
--
Tony Evans
Saving trees and wasting electrons since 1993
blog -> http://perceptionistruth.com/
olmr -> http://www.onelinemoviereviews.co.uk/
[ anything below this line wasn't written by me ]
date: Tue, 01 Sep 2009 16:26:45 +0100
author: Tony
|
Re: Image hotlinking affecting stats?
In uk.net.web.authoring, Richard Cole <ispcrco@hotmail.com.invalid> wrote:
>I had a similar problem a few years back with a German Bassist using one of
>my small images in his signature for all his (very frequent) forum
>postings. This was determined by following the referrer information to see
>where the link was from.
>
>Initially I renamed the image on my site and in HTML references (easy with
>Dreamweaver) then copied a Swastika image to the filename that he was
>linking. That seemed to stop the links PDQ and when I checked the forums,
>all of his posts had disappeared too, so that was satisfying.
>
>I later fixed it properly with a .htaccess file using a rewrite rule for
>all images, where the referrer wasn't from one of my domains. Basically:
>
># Enable Rewrite
>RewriteEngine on
># Image theft rewrites
>RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png)$ [NC]
>RewriteCond %{HTTP_REFERER} !^$
>RewriteCond %{HTTP_REFERER} !domain1name\.co\.uk [NC]
>RewriteCond %{HTTP_REFERER} !domain2name\.co\.uk [NC]
>RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
>RewriteRule (.*) /stolen_image.html?/$1 [R,NC,L]
Hmm, I wonder.
I know this could be written so that requests to animage.jpg which don't
have the correct referrers could return lq-animage.jpg which is a low
quality version, with maybe a banner across it saying how to see the full
version (visit the site, etc.)
But creating all those would be tiresome.
Could it be automated? Could you use .htaccess to redirect requests to
anyimage.(gif|jpe?g|png) to a php script (or some other script) which then
manipulated the image and output the correct content header and the
manipulated image? CPU cycles on my server are in greater supply than
bandwidth, so I could cope with using some of the former to save the
latter.
--
Tony Evans
Saving trees and wasting electrons since 1993
blog -> http://perceptionistruth.com/
olmr -> http://www.onelinemoviereviews.co.uk/
[ anything below this line wasn't written by me ]
date: Tue, 01 Sep 2009 21:55:53 +0100
author: Tony
|
Re: Image hotlinking affecting stats?
On Tue, 01 Sep 2009 21:55:53 +0100, Tony wrote:
>In uk.net.web.authoring, Richard Cole <ispcrco@hotmail.com.invalid> wrote:
>># Enable Rewrite
>>RewriteEngine on
>># Image theft rewrites
>>RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png)$ [NC]
>>RewriteCond %{HTTP_REFERER} !^$
>>RewriteCond %{HTTP_REFERER} !domain1name\.co\.uk [NC]
>>RewriteCond %{HTTP_REFERER} !domain2name\.co\.uk [NC]
>>RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
>>RewriteRule (.*) /stolen_image.html?/$1 [R,NC,L]
>
>Hmm, I wonder.
>
>I know this could be written so that requests to animage.jpg which don't
>have the correct referrers could return lq-animage.jpg which is a low
>quality version, with maybe a banner across it saying how to see the full
>version (visit the site, etc.)
>
>But creating all those would be tiresome.
>
>Could it be automated? Could you use .htaccess to redirect requests to
>anyimage.(gif|jpe?g|png) to a php script (or some other script) which then
>manipulated the image and output the correct content header and the
>manipulated image? CPU cycles on my server are in greater supply than
>bandwidth, so I could cope with using some of the former to save the
>latter.
Tony
Do a search on the web, there are plenty of example .htaccess files that
you can use as a base example. That's where my .htaccess came from.
Richard
--
http://www.caravanningnow.co.uk
...and so, as the Wispa of mortality melts into the upholstery of fate
in the overheating Vauxhall of destiny, towing the caravan of doom
ahead of the motorway tailback of eternity... - Humphrey Lyttelton
closing comment in I'm sorry I haven't a clue.
date: Wed, 02 Sep 2009 18:36:02 +0100
author: Richard Cole lid
|
Re: Image hotlinking affecting stats?
In uk.net.web.authoring, Richard Cole <ispcrco@hotmail.com.invalid> wrote:
>Do a search on the web, there are plenty of example .htaccess files that
>you can use as a base example. That's where my .htaccess came from.
Yeh I've used an .htaccess to block image 'hotlinking' in the past, and
there's one decent search that returns a php script, but that script
outputs an HTML page and sets the content type for that. Which I guess
means when people put it between an <img > tag it breaks the tag entirely,
defeating the purpose of the script.
I might have a play.
My main interest is in wordpress installations, which use a
wp-content/upload directory structure for media uploaded via the Wordpress
interface. There are a couple of wordpress plugins, but they're old or
simplistic (one of them just adds the typical stuff to the .htaccess file).
Personally I honestly expected there to be a better wordpress solution, but
on the other hand the plugin search on the wordpress site is about as
useful as a chocolate fireguard so it's easy to miss good plugins.
This is actually relevant to me at the moment since some Australian forum
is hotlinking to some screenshots, directly from my wp-content directory on
my personal blog. Sadly, the post with the images isn't accessible on
their site so I can't even see what they're saying about them.
I'm trying to avoid being a grouchy old bastard and .htaccessing them to an
image which says 'next time ask' or something, so it would be a perfect
chance to deliver a lower quality image with a subtitle 'to see this in
it's natural setting, go to blah'.
--
Tony Evans
Saving trees and wasting electrons since 1993
blog -> http://perceptionistruth.com/
olmr -> http://www.onelinemoviereviews.co.uk/
[ anything below this line wasn't written by me ]
date: Wed, 02 Sep 2009 19:12:06 +0100
author: Tony
|
|
|