Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Complete Hotlink Protection Details »
Complete Hotlink Protection
Mod Version: 1.00, by naveeid (Coder) naveeid is offline
Developer Last Online: Apr 2019 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (3 votes - 5.00 average) Installs: 20
Released: 26 Apr 2011 Last Update: Never Downloads: 0
Not Supported Re-usable Code Translations  

Title : Complete Hotlink Protection

Version : 1.1

Coder : naveeid
Purpose : Prevent your forum attachments from being directly linked to - prevent bandwidth abuse.

Why : My dedicated server was down due to too many hotlinked image connections. i was feeling helpless. even after protecting images through .htaccess, images were still hot linked through attachment.php



How : just edit your server .htaccess and modify the code with your domain names



Installation :
edit your .htaccess file.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


1) please change yourfirstwebsite.com and yoursecondwebsite.com to your websites on that cpanel account. if you dont have a second website then you can remove that line

2) i am allowing google to fetch images or attachments for their server. if you dont want to allow google then just remove that line.

3) replace anypic.jpg with your website banner or hotlink warning banner.

it works very fine. its the simplest and easiest available soloution.

Demo:-
i have installed it on my website , you can check my website for hotlink protection.
http://www.nidokidos.org/attachment....3&d=1302073196
now this image will show in my website , this image will be displayed if opened it in a browser. but if it will be opened in any other website , it will be replaced by my website banner.

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Mini Mods YBMF-Hotlink Image protection TimberFloorAu vBulletin 4.x Template Modifications 8 03 May 2011 15:15

Comments
  #2  
Old 26 Apr 2011, 06:51
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Code removed

Last edited by Boofo; 27 Apr 2011 at 04:00.
Reply With Quote
  #3  
Old 26 Apr 2011, 07:05
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
well if a server is already overloaded , then it should not allow any directory to be hotlinked.
Reply With Quote
  #4  
Old 26 Apr 2011, 07:15
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
You don't have to put anything in to that directory if you don't want to. It just allows you to if ever needed.

And your Google code is redundant as this takes care of it already:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #5  
Old 26 Apr 2011, 10:28
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
Originally Posted by Boofo View Post
There is an easier and better way to do this and allow images to be hot-linked from one directory only (for posting error pics and avatars on other sites if they don't allow them locally).


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Use either of the last 2 lines depending on what you want.
Boofo is there any solution for hotlinking through attachment.php in these lines?
Reply With Quote
  #6  
Old 26 Apr 2011, 21:32
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Do you allow guests to download attachments?
Reply With Quote
  #7  
Old 27 Apr 2011, 03:32
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
well in my forum guests are allowed to download attachments and view attached images.
Reply With Quote
  #8  
Old 27 Apr 2011, 03:46
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
through this mod , if any picture will be embedded/hotlinked through attachment.php on any OTHER website , it will display website banner or warning picture instead. similarly any other mp3 or download links of your forum files will be placed on any OTHER website , they will show your website banner or bandwidth theft warning when clicked.
Reply With Quote
  #9  
Old 27 Apr 2011, 04:00
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
No problem. I have removed my code.
Reply With Quote
  #10  
Old 03 May 2011, 14:17
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Real name: Mj Bain
Where should this go? in forum? or root?
__________________
____________
BossLady
Reply With Quote
  #11  
Old 03 May 2011, 14:19
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Root.
Reply With Quote
  #12  
Old 03 May 2011, 14:20
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Real name: Mj Bain
and if the image isn't available....

What will it show?

the standard vb error message?
__________________
____________
BossLady
Reply With Quote
  #13  
Old 03 May 2011, 14:29
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Real name: Mj Bain
what if my attachement.php

is under a different folder?
__________________
____________
BossLady
Reply With Quote
  #14  
Old 03 May 2011, 20:52
billstelling's Avatar
billstelling billstelling is offline
 
Join Date: Apr 2011

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

is that correct?

opps put the wordpress in the wrong spot.. fixed
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?thewindowscenter.wordpress\.com/ [NC]

Last edited by BirdOPrey5; 11 Sep 2011 at 23:54. Reason: Put code in code box.
Reply With Quote
  #15  
Old 03 May 2011, 21:15
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
naveeid, your attachment.php line does not work. I set guests to be able to download/view attachments, and this did not stop anyone from another site being able to hotlink it. When I set guests back to not be able to view or download attachments, then they got the login screen on a hotlink. But they got that anyway before the attachment.php line was added to the htaccess. So that code is redundant.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 04:58.

Layout Options | Width: Wide Color: