The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Blocking Bandwidth Thieves
MR. T
post Jun 10 2007, 06:38 AM
Post #1





Group: Members
Posts: 2
Joined: 10-June 07
Member No.: 3,050



Hi,

I am trying to block hotlinking of my images and files so it only allows me to hotlink on my main side and 2 subdomains. For example these are my 3 domains.

1. http://maindomain.com
2. http://forum.maindomain.com
3. http://media.maindomain.com

All my images and files are stored on my media subdomain and my other 2 sites 1. and 2. ask for the files. I have tried this script in a .htaccess file but it wont work.

CODE

  RewriteEngine On

  RewriteCond %{HTTP_REFERER} !^$
  RewriteCond %{HTTP_REFERER} !^http://(www\.|forum\.|media\.)?maindomain\.com [NC]

  RewriteRule \.(bmp|gif|jpe?g|png)$ /images/linking.jpg [R=302,L]
  RewriteRule \.(swf|mp3|wmv|zip)$ - [NC,L,F]


Any ideas why it wont work, Please?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Jun 10 2007, 12:08 PM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



In what way doesn't it "work"?

I don't know the htaccess syntax, but I guess that the problem is that many people disable the sending of the refer(there's another r here but this brain-dead forum software prevents me from writing in in the obvious way)er header, so unless you want to stop such (genuine) visitors from seeing your images, you have to accept "no refer-r-er", which of course lets bandwidth lifters in.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 05:26 PM