Closed Thread
Results 1 to 15 of 15

Thread: How do I stop "Hotlinking"?

  1. #1
    Member htf is an unknown quantity at this point
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    63

    How do I stop "Hotlinking"?

    I found this code when searching the board:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://you.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.you.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://123.456.789.192/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.yourfriend.com/dir/.*$ [NC]
    RewriteRule .*\.(gif|GIF|jpg|JPG)$ http://www.you.com/ [R]
    -----------------------------------------------------
    I replaced you.com and www.you.com with my details,
    tried uploading in Binary and ASCII mode,
    left out the line with the numbers
    but, the .htaccess file doesn't show on the server, neither ASCII nor Binary and I still can hotlink.

    Can somebody please, please help me?

  2. #2
    Doctor Hexagon Canuckkev is just really niceCanuckkev is just really niceCanuckkev is just really niceCanuckkev is just really nice Canuckkev's Avatar
    Join Date
    Dec 2000
    Location
    Calgary, Canada
    Posts
    3,582
    I'm not sure on how to do it, and I'm not going to search for your, but I will explain at least one thing. The .htaccess file is usually hidden to FTP, but if you uploaded it, it's there, just hidden.

  3. #3
    which language?

  4. #4
    Member htf is an unknown quantity at this point
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    63
    thanks guys, so it's there but it is hidden. OK.
    But it still doesn't work, so I'll have to experiment...............

    The language is English.

  5. #5
    tripcode jmiller is a glorious beacon of lightjmiller is a glorious beacon of lightjmiller is a glorious beacon of lightjmiller is a glorious beacon of lightjmiller is a glorious beacon of lightjmiller is a glorious beacon of light jmiller's Avatar
    Join Date
    Feb 2002
    Location
    kanuckistan
    Posts
    4,895
    Originally posted by htf
    thanks guys, so it's there but it is hidden. OK.
    But it still doesn't work, so I'll have to experiment...............

    The language is English.
    I think rapmaster meant which programming language, though I could be mistaken.


  6. #6
    NLC YUPAPA will become famous soon enough YUPAPA's Avatar
    Join Date
    Apr 2001
    Location
    Location
    Posts
    2,517

    Wink

    I think this have to deal with apache or .htaccess?!?
    It doesn't have anything to do with programming!

  7. #7
    tripcode jmiller is a glorious beacon of lightjmiller is a glorious beacon of lightjmiller is a glorious beacon of lightjmiller is a glorious beacon of lightjmiller is a glorious beacon of lightjmiller is a glorious beacon of light jmiller's Avatar
    Join Date
    Feb 2002
    Location
    kanuckistan
    Posts
    4,895
    I know that it has to do with .htaccess, but I believe rapmaster was asking what programming language it was in.
    though as I said I may be wrong.


  8. #8
    yes I'm asking what programing language. There are some pretty niffty scripts that use CHMOD'n and secure directories to offer links that can only be accessed through the script. But w/e

  9. #9
    Member htf is an unknown quantity at this point
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    63
    well, hate to say that but I wouldn't really know what you mean, since I don't know too much.
    Got a webpage, tried couple of free servers, went for a paid host, have plenty of bandwidth but.......don't want people to hotlink to my files using what I pay for.
    Found the code (see my first post) know now, that the.htaccess file can't be seen but it still doesn't work. My Domain Name is not active yet so I can't really test it....................
    Does that help regarding to the question with the language?

  10. #10
    NLC YUPAPA will become famous soon enough YUPAPA's Avatar
    Join Date
    Apr 2001
    Location
    Location
    Posts
    2,517

    Wink

    Hi,

    Do you just want to protect your zip file?
    You don't want ppl to hotlink to your zip files?

    I think I know how to do that, but you have to store those files into the same directory.

  11. #11
    Member htf is an unknown quantity at this point
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    63
    no, no zip files, just the general gif, jpg, rm files.
    That's what people like to use to post in messageboards or even display on their own sites, leeching my bandwidth.
    Since I am having a bandwidth usage limit now with my paid hosting I would not want others to use it.
    Spent almost a day to try to find info on this.
    Some people say it's easy, some sites even generate a code, but I guess, as long as my domain name doesn't work (I changed DNS on it) I'll have to wait to find out if it does work.
    Thanks anyway

  12. #12
    Junior Member binladun is an unknown quantity at this point
    Join Date
    Aug 2002
    Posts
    9

    Take a look at this site ! It may help you !

    Hi !

    I found this site http://PicKeeper.com - they said "Protect image warranty 100%" - Try to take a look.

    Hope this help !

    Hi everybody ! I'm new here - My name is Binladun (not Binladen)

    Regards!
    Bin

  13. #13
    Pro Member invisionz is an unknown quantity at this point invisionz's Avatar
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    342
    - off topic -

    WOW i didn't know Bin Laden was a web programmer..

    Guess you learn something new every day
    http://www.invisionhost.com - Webhosting starting from $19.95 /Year!

  14. #14
    Rebutted, enshrined meow is an unknown quantity at this point meow's Avatar
    Join Date
    Feb 2001
    Location
    FP Crematory
    Posts
    8,658
    It isn't a programming language per se. It's apache configuration.

    Anyway htf, your last line is wrong. I use this:
    Code:
    RewriteEngine on
    
    RewriteCond %{HTTP_REFERER}   !^$
    RewriteCond %{HTTP_REFERER}   !^http://ok-url.com/.*$          [NC]
    RewriteCond %{HTTP_REFERER}   !^http://www.ok-url.com/.*$      [NC]
    
    
    ReWriteRule .*\.(gif|jpg|png)$              -                  [N,F,L]
    (o<
    //\ &nbsp; &nbsp; &nbsp; =^..^=

  15. #15
    Member htf is an unknown quantity at this point
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    63
    Thanks to all.
    I got it to work, it's brilliant, stops hotlinking completely and is quite easy to do if the host does allow the file

Closed Thread

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