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 16:15

  #31  
Old 24 Oct 2012, 17:39
viper357's Avatar
viper357 viper357 is offline
 
Join Date: Dec 2006
It's blocking images on tapatalk, any idea how we can allow tapatalk?
__________________
Marine Aquariums
Reply With Quote
  #32  
Old 16 Dec 2012, 03:39
Ary Braga Ary Braga is offline
 
Join Date: Jun 2009
Re:Complete Hotlink Protection Reply to Thread

naveeid and Boofo. I'm from Brazil

My .HTACESS stayed that way


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

Until herein perfect.

I have a doubt.

The image that will be replaced in the hotlink, should be the same as the image copies from within my domain ?

The image that will be replaced in the hotlink is warped.

Eg: The original image is 200px x 400px.

My hotlink picture. Should measure 200 x 400 too?
Or should lower?

The problem that my images vary in height and width.

Is there any way to set it somewhere or file?

The hotlink img is here:

The test only is here
Reply With Quote
  #33  
Old 08 Jan 2013, 07:03
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
Originally Posted by Ary Braga View Post
naveeid and Boofo. I'm from Brazil

My .HTACESS stayed that way


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

Until herein perfect.

I have a doubt.

The image that will be replaced in the hotlink, should be the same as the image copies from within my domain ?

The image that will be replaced in the hotlink is warped.

Eg: The original image is 200px x 400px.

My hotlink picture. Should measure 200 x 400 too?
Or should lower?

The problem that my images vary in height and width.

Is there any way to set it somewhere or file?

The hotlink img is here:

The test only is here

brother you can not control this. because the image we replace with hotlinked image is different sizes. i think its not important , we can ignore this.
__________________
------------------

Nidokidos Official forum
Reply With Quote
  #34  
Old 08 Jan 2013, 07:04
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
Originally Posted by viper357 View Post
Does this work in vb3? I've put this at the bottom of my htaccess file but it doesn't seem to work, can someone check it for me please? My website is in my signature. Thanks.

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



i cant say anything about vb3 , if the same attachment.php type of thing is there in vb3 , then i think it will work out.
__________________
------------------

Nidokidos Official forum
Reply With Quote
  #35  
Old 08 Jan 2013, 07:06
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
Originally Posted by viper357 View Post
It's blocking images on tapatalk, any idea how we can allow tapatalk?


to allow any webiste , just add this code below the google line


RewriteCond %{HTTP_REFERER} !^http://(.+\.)?google\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?YESTOTHISWEBSITE\.com/ [NC]

replace YESTOTHISWEBSITE with the name of the website which you want to allow for hotlink.
__________________
------------------

Nidokidos Official forum
Reply With Quote
  #36  
Old 19 Jun 2013, 16:11
MonkYZ MonkYZ is offline
 
Join Date: Jul 2008
What if i have vBSEO installed? Seems like it's not working for me (as it's rewriting the url to make it friendly - therefore it doesn't have the attachment.php inside). Let's do a test:

I will use an IMG for this:

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



See? It's still showing... although i've added the .htaccess lines...
Reply With Quote
  #37  
Old 04 Sep 2014, 22:03
thetechgenius's Avatar
thetechgenius thetechgenius is offline
 
Join Date: Jun 2014
Does anyone have the web.config version of this? I am using iis 7 (windows server 2008R2), and as you know, windows uses web.config, not htaccess.
Reply With Quote
  #38  
Old 05 Sep 2014, 01:57
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Aug 2009
Real name: Chris
I have seen you ask numerous times about the windows server, is there a particular reason you don't switch to a Linux server?
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #39  
Old 05 Sep 2014, 17:07
madness85 madness85 is offline
 
Join Date: Jun 2012
works great thank you
Reply With Quote
  #40  
Old 16 Oct 2014, 13:20
angeljs's Avatar
angeljs angeljs is offline
 
Join Date: Aug 2005
Real name: Angela
Thanks so much for this, just what I needed. I uploaded it to my forum directory as it wouldn't work in the root.
Reply With Quote
  #41  
Old 23 Apr 2015, 12:17
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
welcome madness85
__________________
------------------

Nidokidos Official forum
Reply With Quote
  #42  
Old 23 Apr 2015, 12:18
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
welcome angeljs
__________________
------------------

Nidokidos Official forum
Reply With Quote
  #43  
Old 23 Apr 2015, 12:18
naveeid's Avatar
naveeid naveeid is offline
 
Join Date: Jan 2011
i have no idea about VBSEO MonkYZ
__________________
------------------

Nidokidos Official forum
Reply With Quote
  #44  
Old 18 Jan 2016, 11:10
MikeSheen MikeSheen is offline
 
Join Date: May 2012
I was looking for something fairly targeted for hotlink redirection and didn't find anything posted here suitable, so I'm sharing my solution - it's not ideal - if there is an update to vbulletin I'll need to re-apply my changes, but for my purposes it worked.

I found an image hotlinked to my site from a cricket enthusiast site - the image was this:



It was some Indian cricket nut trying to diss the Aussies in a post about cricket after a win by India over Australia, so I specifically targeted referrers from that site to display this image instead:



How I ended up doing it was hacky, but it works... in attachment.php, I just added these lines of code:


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

Simple, silly and pointless, but I had fun

URL of the post hotlinking is here - but no doubt the poster will edit their post when they learn of my tricksies, so it may not last long.

Last edited by MikeSheen; 18 Jan 2016 at 11:18.
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 18:21.

Layout Options | Width: Wide Color: