Web Hosting Talk







View Full Version : Site Hot linking to files


MarcD
11-26-2001, 10:32 AM
Hello all im having a problem with a site from portugal hot linking to files on our server
Here are the actions i have done.


Htaccess <-- Didnt work Tried 5 ip's none stopped it
Emailed the webmaster * no response *
posted on there forums was told that the internet is free and im a ***** *** *** American

Emailed there host recieved a email back next day saying was being forwarded to correct department
5 days later no response
Emailed them agin 2 days later no response


Now all the files are being takend from a php script eg

files.php?cat=5&id=8

I can add into them a refer blocker to ban them
but there are about 450 files and it would take me about 8 hrs to do all that


Is there anything else i can do there host is not responding

And there is a serious language barrier here for me as i know 0 portugese

jnestor
11-26-2001, 11:00 AM
If you have mod_rewrite you can use the anti-hotlinking rules. Otherwise it seems like you should be able to build them into the php script itself. Unless you have 450 scripts. The mod_rewrite rules basically say don't server the file if the referrer is not blank and not this site. You can't block by IP since it's the browser that requests the file and not the other server.

JustinK
11-26-2001, 12:54 PM
<begin evil streak>

How about changing the image files to various things against their host's TOS and then just change the names of the files you use as a started as well as the mod rewrite part. You can then load up their site, take a screenshot and send it to the host. Or you can just redo all the images to have your sites name on them. :D And while your at it, make one a "Proud to be an American" just to spite him.

<end evil streak>

MarcD
11-26-2001, 01:39 PM
Hehe actually they are all zips
im looking into redoing the scripts

I just sent there host a nice invoice for 7 gigs of bandwith that they have used after the proper notification was given.
=)
do i expect them to pay it no.

Travis
11-26-2001, 01:39 PM
The "embarassing image substitution" option is my favorite. ;)

(Now where are those Osama Camel Lust pictures?)


In all seriousness, the mod_rewrite rules are the only effective answer.

MarcD
11-26-2001, 01:44 PM
lol i like that idea i hope they use some images
im sure i could dig up some distastefull portugese joke images
=)

im looking into the mod rewrite i am not that versed in php
right now for the larger files i did a cgi refer check
and am having the script call on that when it goes to the file

Travis
11-26-2001, 01:49 PM
You don't need PHP at all - mod_rewrite is an Apache server module.

Presuming your host has it configured to allow you, you should be able to just put this in an .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://www.domain.com/
RewriteCond %{HTTP_REFERER} !^http://domain.com/
RewriteCond %{HTTP_REFERER} !^http://www.otherdomain.com/
RewriteRule /* http://www.domain.com/index.html [R,L]

...where domain.com is your domain name, and www.otherdomain.com is another site you wish to except from the linking restriction. (You may duplicate this line to add other sites.)

MarcD
11-26-2001, 01:57 PM
sweeeeeeeeet man thanks a ton

i have been using limit allow deny in my hataccess

=)
throwing this on now

Again thanks a bunch
=)
:cartman: :D :D :D :cartman:

MarcD
11-26-2001, 02:28 PM
Lol well this site is taken care of been what 45 minutes since i sent them the invoice for used bandwith and i just went to there site and it translated the text and it has been removed for violation of TOS

=)

YaY
:D

Jason Ellis
11-26-2001, 04:34 PM
Originally posted by JustinK
How about changing the image files to various things against their host's TOS and then just change the names of the files you use as a started as well as the mod rewrite part.

Be *very* careful about this. If the images you're substituting are against *their* host's TOS, then they are probably against *your* host's TOS as well.

We recently had a customer that we very very nearly terminated because of this exact same issue. An administrator at a bulletin board run by United Airlines sent a complaint to our abuse address that our client had posted this really nasty image to their bulletin board. The image was being pulled from their web site, and it was a severe violation of our TOS.

We went through and found a *number* of images that violated our TOS. We shut the site off immediately and wrote a letter to the customer.

In the end, the customer explained himself (people were stealing his images so he did exactly as you suggest above), and we allowed him to keep his account - albeit with a very stern reminder of our TOS and a requirement to remove any violating images immediately and write a letter of apology to the folks at United.

If you're going to substitute images, substitute it with something like "this image was stolen!", do not substitute something that will offend someone and will likely violate your host's TOS. You could easily lose your account.

Jason

JustinK
11-26-2001, 07:00 PM
yes yes, I didn't mean to go against the TOS of the host you're on (though people should use some common sense like that). However if you're on a server allowing adult content and they aren't... :dgrin:

MarcD
11-27-2001, 04:02 PM
Ya i wouldnt put images that would get me in trouble

but i think a nice pic of a 450lb lady in a gstring bikini doing jumping jacks is a mighty gross picture. =)