SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    cpanel hotlink protection

    Noticing that someone was hotlinking my image(s) I enabled hotlink protection.

    But then noticed ,that cached pages by Google/Yahoo, etc, were disconnected from the images, which I don't want to play around with.

    It seems very impractical to try and list each possible site that may want to cache the pages via
    cpanel's "URLs to allow access::"

    What is a better way of doing this?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    I suppose I would get in trouble for this, but if there weren't too many images involved, I'd rename the images on my own site and put something offensive in their place (or maybe just a black image or something).
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually there is quite a few images. And surely quite a few directories that cache images, like the home page and more.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    I gather you can prevent hotlinking via a .htaccess rule, such as

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?YourSite\.com/.*$ [NC]
    RewriteRule \.(gif|jpg)$ - [F]
    as mentioned here: http://www.buildwebsite4u.com/advanc...ess-file.shtml
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  5. #5
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    I gather you can prevent hotlinking via a .htaccess rule, such as...
    Yes but here again, this shuts out cached big-directory images.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •