Hotlinking, and how to prevent.

How can you prevent someone linking files from your website onto other sites? As seen in the pic I put in the news today (or didn’t), the pic I linked to was not shown. Instead, there was a small image of an advert.

Can this be done for individual folders, or does it have to be everything?

Je suis clueless…

You can do it in the .htaccess file, but I can’t remember off the top of my head how it’s done.

I think you may need mod_rewrite running on the server.

Cheers Mupps. :slight_smile:

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
order deny,allow
deny from all
AuthUserFile /home/karlos/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/karlos/public_html/_vti_pvt/service.grp

That’s what the .htaccess file says in the public htm folder. I guess I’d have to drop a copy of it into the appropriate folder & amend it somehow.


I love this place. Cheers Monsieur Muppett, you are a star. :smiley:

Oh my god, I’m lost… I did the bit in that link, and it doesn’t show the image, but it still shows the link. I tried to redirect it to a different image, but it didn’t work.

Looked at the mod rewrite page… totally baffled.

I have seen “hot linked images” that are changed automatically to something unsavoury, the guy who hot links still see’s the original image, it’s very funny, but could get you banned from some forums :smiley:

Is your webhost running mod_rewrite Bibby ?

I’ve asked them, awaiting a reply. I use hostingunlimited.

Just had to fettle with my ftp prog to make sure I was uploading it in ascii.

That image you posted in the cantina doesn’t show up… so I presume it’s working :slight_smile:

HU seem to have mod_rewrite installed.

It appears to have blocked the image, but the point it to another image thing isn’t working yet.

More fettling…

Bibby - as you are using Hosting Unlimited, log in to your control panel, scroll down to the bottom of the page, the icon above Fantastico = HotLink Protection :smiley:

Hit the activate button and enter the re-direct and thats it. And to allow for hotlinks from specific site i.e. this one, enter the addy in the allowed box and Robert is your mother brother :chuckle: