PDA

View Full Version : Hotlinking


Aaron
01-26-2003, 08:17 PM
Is there a way just to not allow certain sites to hot link instead of having to enter sites allowed?

Rodzilla
01-26-2003, 09:32 PM
Ehehehe...

*If you visited this link previously, do not visit it again.*

My .htaccess file:

RewriteEngine on

RewriteCond %{HTTP_REFERER} ^http://[^.]+\.th3b4r.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg)$ http://rodzilla.netfirms.com/thebar.gif [R,L]

RewriteCond %{HTTP_REFERER} ^$ [OR]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.seriouscommunity\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.seriouszone\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.seriousengine\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.serioussam\.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://seriouscommunity\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://seriouszone\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://seriousengine\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://serioussam\.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://64\.191\.4\.64*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://66\.96\.228\.157*$ [NC]
RewriteRule \.(gif|jpg|jpeg)$ http://bellsouthpwp.net/j/r/jrodzik/seriouslylink.gif [R,L]

The first set is specific for The Bar's website. The second set is generic.

admin
01-26-2003, 10:54 PM
Cpanel also has a method for trying to help you do this. But it simply creates a file like the one Rod showed. You are better off, trying to use Rod's example.

Thanks Rod!

Aaron
01-27-2003, 01:42 AM
ok I tried that but it stopped hotlinking unless I allowed certain sites. I wanted find a way to disable hotlinking on a particular site. It's too much trouble to go through and allow hotlinking for every site.

Afkamm
02-05-2003, 07:51 PM
I've just noticed that although my larger jpg pictures are protected, I've forgotten to protect the thumbnails :)


Marc :-)

admin
02-05-2003, 07:51 PM
oops

Rodzilla
02-06-2003, 12:27 AM
And it's the thumbnails that are usually hotlinked.. ;)

Aaron
03-13-2003, 01:36 AM
I had this turned on and got several complaints that some people couldn't see the site because the whole thing said the images were being hotlinked. I had everything fixed right, and visited the page on serveral different computers and saw it load correctly, however like I said people were saying my hotlink image was showing instead of my site. Any idea why?

Afkamm
03-13-2003, 01:48 AM
Just visited and didn't see any missing images. Do you have the hotlink code in the .htaccess file that's at the root of your webspace, or inside the directory that holds all the images?

Post the code here if you like and we can double check for you. :)

Marc :-)

Aaron
03-13-2003, 05:51 AM
It's on right now, I'm getting complaints from only some people saying it doesn't work.

RewriteEngine on

RewriteCond %{HTTP_REFERER} ^$ [OR]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.thekryptonian\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.thedarkknight\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.theortegas\.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.thefatz\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thekryptonian\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thedarkknight\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thefatz\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://theortegas\.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://thedark\.thekryptonian\.com/*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ortega\.thekryptonian\.com/*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://tongan\.thekryptonian\.com/*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://zs\.thekryptonian\.com/*$ [NC]
RewriteRule \.(gif|jpg|jpeg)$ http://x-isle.shadowsofnamek.com/hotlink.gif [R,L]

Afkamm
03-13-2003, 08:09 AM
This is what I have in mine....


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://larawallpapers.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.larawallpapers.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://afkamm.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.afkamm.co.uk/.*$ [NC]
RewriteRule .*\.(jpg|jpeg|gif)$ http://www.larawallpapers.co.uk/images/anti-leech.jpg [R,L]


No difference apart from your line that has [OR] in it, don't know it that makes a difference or not, can't see it allowing everyone apart from a few. Maybe they are using some sort or proxy or anonymous browser?

As far as I know mine works ok, never had any complaints anyway though I doubt anyone would email me to say if something was up lol

Marc :-)

Rodzilla
03-13-2003, 07:40 PM
RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.seriouscommunity\.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.seriouszone\.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.seriousengine\.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.serioussam\.org.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://seriouscommunity\.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://seriouszone\.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://seriousengine\.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://serioussam\.org.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://64\.191\.4\.64*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://66\.96\.228\.157*$ [NC]
RewriteRule \.(gif|jpg|jpeg)$ http://bellsouthpwp.net/j/r/jrodzik/seriouslylink.gif [R,L]

The very first line means that there was no referrer. This is necessary for people who have software for blocking that information from being sent, as well as for letting people link to your pictures in IRC or something. I'll bet you that the people having problems are running Mcafee or Norton internet security or something similar...