homepage Welcome to WebmasterWorld Guest from 50.19.169.37
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Hotlinked Images - Appear Fine For a Minute Then Broken
Users hotlink images to my forum - 75% end up as broken images
kirkpa31




msg:4560389
 9:51 pm on Apr 1, 2013 (gmt 0)

Users provide a direct link to the image which is then displayed inline in their post. However, about 75% of these hotlinked images display for a minute and then break and display a broken image graphic.

example: <snip>

I am unsure if:

1)Is this b/c the website my users are linking the image from has hotlink protection on through .htaccess with code like the following:

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?samplewebsite.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]


2) If that is the case, can I override this somehow so that the images not appear as broken? If that's not the case, can I add some sort of code to my .htaccess file to prevent this image breaking from occuring?

[edited by: incrediBILL at 2:11 am (utc) on Apr 2, 2013]
[edit reason] no links to screen shots please, see forum charter [/edit]

 

phranque




msg:4560397
 10:42 pm on Apr 1, 2013 (gmt 0)

welcome to WebmasterWorld, kirkpa31!

have you tried this in multiple browsers?
does this behavior occur with cache cleared?

Leosghost




msg:4560401
 10:46 pm on Apr 1, 2013 (gmt 0)

If that is the case, can I override this somehow so that the images not appear as broken? If that's not the case, can I add some sort of code to my .htaccess file to prevent this image breaking from occuring?

No..and No..
And a very good thing too..hotlinking costs someone else bandwidth..

phranque




msg:4560405
 11:04 pm on Apr 1, 2013 (gmt 0)

If that is the case, can I override this somehow so that the images not appear as broken?

you can fix this in the forum content by referring to an image resource on your server rather than referring to an unreliable image server.

If that's not the case, can I add some sort of code to my .htaccess file to prevent this image breaking from occuring?

as it is, your visitor's browser is not making this request from your server, so your .htaccess file cannot do anything about how that browser renders that img element.

kirkpa31




msg:4560408
 11:17 pm on Apr 1, 2013 (gmt 0)

have you tried this in multiple browsers?
does this behavior occur with cache cleared?


Yes and Yes

And a very good thing too..hotlinking costs someone else bandwidth..


I knew this was the case but...

you can fix this in the forum content by referring to an image resource on your server rather than referring to an unreliable image server.


...that is what I thought the only solution was.



So long as I know it's an external issue and not something that I can control - i am happy

Thank you guys for the quick reply!

Leosghost




msg:4560410
 11:32 pm on Apr 1, 2013 (gmt 0)

Bear in mind ..that if you decide to copy all the images being hotlinked to your own server and thus allow your users to "refer" them from there..No doubt the owners of these original images will find out..and some will issue DMCAs or equivalents ..to Google ..and also directly to your hoster ..

Google may remove you from SERPS..and your hoster may well simply close your account..and the same thing may well happen even if you move hosts..

So ..

The question is..

Do You Feel Lucky ?...

kirkpa31




msg:4560412
 11:46 pm on Apr 1, 2013 (gmt 0)

Do You Feel Lucky ?...


ya...these aren't FBI documents im hotlinking

Leosghost




msg:4560418
 12:09 am on Apr 2, 2013 (gmt 0)

Do You Feel Lucky ?...


ya...these aren't FBI documents im hotlinking

Somehow, I knew ( call me cynical ..or prescient ;) that you knew,
im hotlinking


That you were /are stealing bandwidth..

and you were just hoping that someone here, would tell you that there was a way, to continue stealing, and not to get caught, that you had not thought of..

lucy24




msg:4560421
 12:25 am on Apr 2, 2013 (gmt 0)

However, about 75% of these hotlinked images display for a minute and then break and display a broken image graphic.

You've learned something useful here and I wish all forum members everywhere* would understand it. Please try to spread the word. When you're putting up a post including an image link, look at the post in a different browser. It isn't only caching; the site may have set a cookie that tells it you're allowed to view that particular file. Few things are more exasperating than reading a long lead-in and then slamming into a NO HOTLINKS icon in place of the promised picture of your cat doing something adorable.

This applies just as much to deep links as to hotlinks; the site can't tell the difference.

Edit: Oh, c'mon, Leo. I could post a link to a picture hosted on my own site and that would be a hotlink in every sense of the word. The site owner's permission, or lack thereof, plays no role in the definition of a hotlink.


* Present company excepted, if only because this forum doesn't "do" images.

Leosghost




msg:4560436
 12:48 am on Apr 2, 2013 (gmt 0)

Depends if one's images are how one earns one's living Lucy..if one makes images for a living ..and they are constantly stolen via hotlinking..or if ones images are constantly being hotlinked and one's hosting bills are horrifically high as a result of that ( hosting was not always as cheap as it is is now..I've personally known someone who has lost the roof over their head, because one of their images was hotlinked , back in the days when a "gig" was $5.oo ..and they suddenly lost $2000.oo from their bank account )..by the OPs own words ..they understand that hotlinking costs the original hoster..but they don't care as long as it isn't the FBI..

Hotlinking does not refer to linking to ones own images on one's own hosting account(s)..it refers to linking to some one else's images, hosted on someone else's hosting account, and knowing that they, not the hotlinker, will be paying any bandwidth bill..

It is like running a car ..by siphoning the petrol( gasoline ) or diesel ..for every journey, without permission, from some else's car..stealing it..

lucy24




msg:4560450
 2:02 am on Apr 2, 2013 (gmt 0)

Hotlinking does not refer to linking to ones own images on one's own hosting account(s)..it refers to linking to some one else's images, hosted on someone else's hosting account, and knowing that they, not the hotlinker, will be paying any bandwidth bill..

That was my point. Morally that may be how you define hotlinking. But functionally that doesn't enter into it. A hotlink is simply an image that lives on a site other than the one that's calling it. If I send you a StickyMail and include a picture of Perdita peering down from the closet shelf-- or even a link to a picture of et cetera-- the wmw* site code neither knows nor cares if there's a relationship between the person who posted the link and the person who's paying for the bandwidth. It's up to me to say "Oh, oops, I posted this link myself, I guess I'd better add the site to my Exceptions list".

And yes, there is an exceptions list. Where hotlinks are concerned, it's whitelisting rather than blacklisting.


* It was probably intended as a convenience, like auto-linking. But sometimes it just annoys me ;)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved