View Full Version : How do I stop "Hotlinking"?
htf
July 25th, 2002, 04:22
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?
Canuckkev
July 25th, 2002, 12:48
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.
rapmaster
July 25th, 2002, 14:46
which language?
htf
July 25th, 2002, 20:44
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.
jmiller
July 25th, 2002, 22:47
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. :rolleyes:
YUPAPA
July 25th, 2002, 22:52
I think this have to deal with apache or .htaccess?!?
It doesn't have anything to do with programming!
jmiller
July 25th, 2002, 23:04
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.
rapmaster
July 26th, 2002, 02:57
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
htf
July 26th, 2002, 07:59
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?
YUPAPA
July 26th, 2002, 18:04
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.
htf
July 26th, 2002, 22:31
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
binladun
August 5th, 2002, 19:08
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
invisionz
August 5th, 2002, 21:03
- off topic -
WOW i didn't know Bin Laden was a web programmer..
Guess you learn something new every day ;)
meow
August 6th, 2002, 04:12
It isn't a programming language per se. It's apache configuration.
Anyway htf, your last line is wrong. I use this:
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]
htf
August 6th, 2002, 04:40
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 :)
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.