+ Post New Thread
Results 1 to 3 of 3
Web Development Thread, blocking hotlinking and adding adverts in Coding and Web Development; On my webspace I am hosting a load of (perfectly legal) MP3 mixes, of some local glasgow DJs. These links ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Thank Post
    Thanked 470 Times in 307 Posts
    Blog Entries
    Rep Power

    blocking hotlinking and adding adverts

    On my webspace I am hosting a load of (perfectly legal) MP3 mixes, of some local glasgow DJs.

    These links have been spread via forums, facebook etc whatever and ive just checked the logs and im now getting about 1000 hits a month and most of them are direct hits, meaning they are just grabbing the files directly.

    The webhost hasn't pulled me up yet but its only a matter of time, so was hoping to disable hotlinking to force folk to actually click on a link and view the page which I would put some subtle ads on whicn could hopefully pay for a bigger hosting package

    Anyone got any experience with this?

  2. #2
    jamiess's Avatar
    Join Date
    Oct 2009
    Balsall Common
    Thank Post
    Thanked 20 Times in 17 Posts
    Rep Power

    One way to block hotlinking is to create a .htaccess file. This should sort it out.

    PHP Code:
    RewriteEngine on
    %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/.*$ [NC]
    RewriteRule \.(gif|jpg)$ http://www.domain.com/nohotlinking.html [R,L] 
    You need to change domain.com to your domain, the last domain will redirect the hot linkers to the domain of your choice.

    As for the ads i would recommend Online Advertising Marketplace | BuySellAds.com


  3. Thanks to jamiess from:

    RabbieBurns (27th November 2011)

  4. #3

    nephilim's Avatar
    Join Date
    Nov 2008
    Thank Post
    Thanked 2,014 Times in 1,463 Posts
    Blog Entries
    Rep Power
    your webhost should be able to block hotlinking directly to your links, which would make them only available through your site. However the above method works well as well.

  5. Thanks to nephilim from:

    RabbieBurns (27th November 2011)

+ Post New Thread

Similar Threads

  1. Blocking .EXE and COM etc on a new Windows 2003 Domain Help!
    By bigb3n in forum Network and Classroom Management
    Replies: 11
    Last Post: 22nd February 2013, 03:30 PM
  2. Replies: 10
    Last Post: 5th February 2009, 05:46 PM
  3. ISA 2006 + blocking internet for AD group
    By Paid_Peanuts in forum Windows
    Replies: 8
    Last Post: 7th December 2007, 06:46 PM
  4. VNC and AD
    By monkeyx in forum Coding
    Replies: 20
    Last Post: 16th March 2007, 07:40 PM
  5. VNC and AD
    By monkeyx in forum Network and Classroom Management
    Replies: 4
    Last Post: 12th March 2007, 02:58 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts