• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

How do I stop "Hotlinking"?

htf

New Member
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?
 
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.
 
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.
 
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:
 
I think this have to deal with apache or .htaccess?!?
It doesn't have anything to do with programming!
 
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.
 
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
 
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?
 
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.
 
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
 
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
 
- off topic -

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

Guess you learn something new every day ;)
 
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}   !^[url]http://ok-url.com/.*[/url]$          [NC]
RewriteCond %{HTTP_REFERER}   !^[url]http://www.ok-url.com/.*[/url]$      [NC]


ReWriteRule .*\.(gif|jpg|png)$              -                  [N,F,L]
 
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 :)
 
Back
Top