![]() |
Complete Hotlink Protection
1 Attachment(s)
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. Code:
RewriteEngine on 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. |
Code removed
|
well if a server is already overloaded , then it should not allow any directory to be hotlinked.
|
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: Code:
RewriteCond %{HTTP_REFERER} !^$ |
Quote:
|
Do you allow guests to download attachments?
|
well in my forum guests are allowed to download attachments and view attached images.
|
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.
|
No problem. I have removed my code.
|
Where should this go? in forum? or root?
|
All times are GMT. The time now is 11:53 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|