Jump to content

Re-enable Hotlink Protection?


Recommended Posts

There have been several threads lately about hotlink protection and disappearing graphics. TCH-Don was very helpful in identifying the problem (hotlink protection) and noting that disabling it for a day seems to fix it. But, since my site is ALL graphics and having them visible is of paramount importance, I have questions:

 

1. How often does this problem occur? Have other forum members encountered this on a regular basis?

 

2. How does one know if the problem is occurring since generally I can see cached copies that look fine and I only find out if someone tells me they went to my site and couldn't see the images.

 

3. How can I tell how long the site was 'compromised' for... i.e. when it stopped working.

 

3. Is there any way to monitor a site to make sure the images are available?

 

4. Is there something else to use besides the hotlink protection offered by cPanel to provide the same kind of protection?

 

5. Would anyone recommend scheduling a weekly (or whatever) disabling of hotlink protection to guard against it suddenly deciding not to work anymore?

 

6. Does it just stay messed up untill you disable the protection or does it come back as suddenly as it disappeared?

 

I'm trying to determine if it's worth having and if I should re-enable it...

 

VI

Link to comment
Share on other sites

Moved for organization. =)

 

I just edit my .htaccess manually to add hotlink protection.

 

This is what mine looks like; the url's listed are *ALLOWED*. Anything not listed gets turned down.

 

>RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$      [NC]
RewriteCond %{HTTP_REFERER} !^http://lisa-jill.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://lisa-jill.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.lisa-jill.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.lisa-jill.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.bloglines.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.bloglines.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://bloglines.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://bloglines.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://technorati.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://technorati.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.technorati.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.technorati.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://chris.lisa-jill.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://chris.lisa-jill.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://lisajill.livejournal.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://lisajill.livejournal.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.livejournal.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.livejournal.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://www.lisa-jill.com/images/hotlink.jpe [R,NC]

 

I haven't had any problems with images not showing since using this version of .htaccess... so I don't have answers to your other questions.

 

Hope that helps. =)

Edited by TCH-Lisa
Link to comment
Share on other sites

I tested mine by enabling hotlink protection in cpanel, and now all my graphics come up as the little red x's. What's the point of the protection if it screws up your site? There must be a better answer than having to go in and change code. :goof:

Link to comment
Share on other sites

I tested mine by enabling hotlink protection in cpanel, and now all my graphics come up as the little red x's.  What's the point of the protection if it screws up your site?  There must be a better answer than having to go in and change code.  :dance:

Did you check Allow direct requests box?

Link to comment
Share on other sites

Lisa - in the URLs to Allow Access box I have:

 

ht*p://gryfalia.com

ht*p://www.gryfalia.com

 

As for my images, I just do an Insert Image from Dreamweaver, so it's just basic code with relative links.

 

sts - no, I did not check that box.

Link to comment
Share on other sites

Bellringer... it's true that you have to get the setup right and allow all the right URLs and check all the right boxes... but what I think is more of a problem is that after you do, when you think everything is just hunky-dory, hotlink protection can, as Don says, just mysteriously "stop working" and you have to wait for someone to email you to tell you that they're not seeing your graphics so you can go in and disable it for a day. To me, that is the bigger problem. You might not know yourself that it's not working because you may be seeing cached pages. Mad!!!

 

For what it's worth, I don't think I'm going to re-enable it at this time. If anything, I'll use Lisa's code and not the hotlink protection from cPanel.

 

VI

Link to comment
Share on other sites

I guess I need some clarification. :unsure:

 

It was my understanding that having hotlink protection enabled keeps others from linking directly to your picture on another site. In other words, hubby couldn't use an image stored on our site as his avatar for a message board.

 

sts - if I do not want someone linking directly to a picture, why would I check this? Perhaps I'm not understanding its purpose correctly.

 

Lisa - Regarding the URLs to allow access box - what am I allowing access to and to whom?

 

Darn fuzzy cpanel explanations :( or maybe it's just a braindead Monday. :P

Link to comment
Share on other sites

bell,

 

I've always had problems with cpanels hotlink protection; and this spans several hosts. That's why I edit .htaccess directly. Supported also helped me with troubleshooting some issues with that script awhile back (way beyond the call of duty =) ).

 

the url's to allow access box is so supposed to make it so that sites referencing images from those url's do NOT get the x's, but get the images. Anyone else would get the x's.

 

Hope that helps. I'm sorry you're having so much difficulty with it. =/

Link to comment
Share on other sites

the url's to allow access box is so supposed to make it so that sites referencing images from those url's do NOT get the x's, but get the images. Anyone else would get the x's.

Thank you! That's the first explanation I've heard that actually makes sense!

 

Rock Sign

Link to comment
Share on other sites

bell,

Direct request means entering the url of an image in your browser,

like you copy http//mysite.com/images/mypicture.jpg and paste it to the address bar.

Also some browsers view pages using direct requests, so if you disallow it some people [like me] will be unable to see images on your own site. You said you enabled hotlink protection and saw little red x's so I thought you're one of those people [like me] :(

btw, cpanels hotlink protection worked ok for me, never saw it suddenly "stopping working"

 

If hubby wants to use an image as his avatar you should add url of the message board to the 'Urls to Allow Access' box.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...