Results 1 to 10 of 10
  1. #1

    Hotlink Prevention!

    Hello! I have a bit of a problem that I am sure is heard rather often.. but here's my problem!

    Well, I have an image gallery site and hotlinking is a major big problem for me. I ask people not to do it on every single page, yet some opt to do otherwise.

    I've tried using the .htaccess file and I've changed every dang parameter possible, and well, what happens is that it won't let me hotlink to my own images.

    It's like this. The webpage is in one directory, and the images are in another, and whenever I use the .htaccess file, the images I'm trying to display on my own page won't come up.

    It's like this:
    On this page, I'm trying to access the images from here:

    I've tried several versions of the .htaccess file, and it won't let the images come up on my site when I use it!

    Does anyone know the exact code I can use to prevent people from hotlinking to my images, but still allowing me to hotlink mine?

    Thank you very much for your help! *Bowbow*

  2. #2
    ....please? *Sad*

  3. #3
    Join Date
    Jan 2004
    did you mean you have your images in folder:

    and you are trying to display images on webpages that are in:

  4. #4
    Join Date
    Jan 2003
    Houston, TX - Originally from UK
    Rose, try this:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?*$     [NC]
    RewriteRule .*\.(gif|jpg|jpeg|bmp|png)$ - [F,NC]
    Just change to...well, your domain!

    That should work, as all it does is stop hotlinking from domains other than yours
    Kinkamono Internet Services - The Internet. Done Right.
    Dive In...

  5. #5
    Join Date
    Jul 2002
    there's a built in hotlink protection in Cpanel if you have it. it allows you to specify certain domains that are allowed to hotlink

  6. #6
    Join Date
    Sep 2002
    If you dont have cPanel try:

    Might find something to help you there.

    Thomas Currie
    Europhase UK Limited - XEN/OpenVZ UK/US Virtual Private Servers | R1Soft Backups for Web Hosts
    Custom R1Soft Backups | UK/US Web Hosting | UK/US Virtual Private Servers
    99.9% Uptime SLA | Non Overloaded Service | Guaranteed Ram / Resources
    Company: SC345142 VAT: GB-947754180 Tel: 0870 4710 895

  7. #7
    Join Date
    Apr 2002
    Southern Maryland
    I have a tutorial here for hotlinking...if all else fails.

    Sara Nelson Photography Preserving your moments since 1973.

  8. #8
    I had that problem too. I use the hotlink protection on Cpanel and sometimes I replace the hotlinked image with one that says "guilty of hotlinking"...

  9. #9
    Join Date
    Jan 2004
    Washington, DC
    ModRewrite is a very, very useful tool!
    Christian Dawson
    Chairman, i2Coalition
    follow us on Twitter @i2coalition!

  10. #10
    Join Date
    Jul 2003
    i belive if some one like me running Norton internet security will be blocked from your images because Norton stops your server from seeing my refer or am i wrong ? because i tried this with some client site.

    any comments ?

Posting Permissions

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