
Hotlinking Or Bandwidth Theft Is Direct Linking To A Websites File Including Images, Video And Others On The External Website. It Has Become Prevalent In The Many Forums And Message Boards On The Web That Allow Users To Insert Images. The User Resorts To Hotlinking Those When Creating The Tag As It Is Not Possible To Keep On The Host Site.The Harm Caused By HotlinkingWhen An Tag Is Used To Display A JPEG Image Found On Someone Elses Webpage So That It Will Appear On Ones Own Site, Journal, Weblog Or Forum Posting, Hotlinking Is Taking Place. Other People Might Find It Flattering To Know That Someone Would Be Interested In A Photo They Have Taken. This Practice, However, Consumes Bandwidth And Slows Down The Web Server. When Done Excessively, The Unknowing Victim Ends Up Footing An Extra Bill From Hisher Hosting Provider.One Sure Sign Of Hotlinking Is The Appearance Of Strange Web Sites In Ones Referrer Logs. When Sites That Wouldnt Normally Be Interested In One Site Are The Ones That Are Appearing, Then Something Is Definitely Up. When The Offending Sites Are Visited, Photos Owned By The Other Site Are Sure To Be Posted There. They Do Not Make Copies Of The Photo But Rather Link Directly To The Photo Hosted On The Website. Higher Than Normal Bandwidth Consumption Is Another Sign. The Log Analysis Tools Might Even Show A Higher Number Of Hits For An Image Than For The Page That Displays It.Blocking HotlinkingThe Only Fool-proof Way To Stop Hotlinking Is To Turn-off Ones Website. This Is Rather Extreme And Does Not Present A Viable Option To Site Owners. The Best Bet Lies On Creating An .htaccess File. Although There Are Many Variations That Exist On The Specific Regular Expressions That Can Be Written, They All Accomplish The Same Thing. One Can Either Throw The Client A "forbidden" Which Means That The Image Is Not There Or The Client Gets To Be Redirected To Another Image Which Is Usually Something Suitably Offensive. Using The Rewrite Rule To Forbid Display Of Image Is A Simple Rule Which Effectively Blocks The Display On Remote Sites. Redirecting Requests For Images From Remote Web Pages To An Image Of Choice On Ones Website Is Taking This Rule A Step Further. A Good Example Of This Is An Image Which Says This Image Is Stolen. A Person Who Tries To Link Directly To The Original Images Of A Site Is Inadvertently Serving The Redirected Image To Hisher Pages.Redirecting A Browser From One File Type To Another Is Essentially Not A Good Idea. The Best Approach Is To Make A Separate Version Of The Redirected Image In Each Format That One Uses On A Site Such As One For Gif Format, One In Jpeg Format, One On Jpg Format And So On. Each Hot Linked Image Is Then Redirected To The Matching File Type.If One Is Feeling A Little Bit Mischievous, Other Interesting Images Can Be Served To People Hotlinking To Ones Images. If The Offender Site Is Into Selling, For Example, An Image That Says Free Shipping Worldwide Would Surely Discourage The Offender As The Very Reason For Hotlinking Is To Make Money, Even In An Unacceptable Manner. No Company Can Survive, Much Less Earn With A Guarantee Such As Shipping For Free Worldwide.Some People Recommend The White List Approach. This Is Basically Blocking All Referrers Except For Those Sites That Are Specifically Allowed To Do So. Again, This Approach Borders On The Extreme As It Blocks All Requests, Legitimate Or Otherwise. Accidentally Blocking Legitimate Requests From Search Engines, Feed Readers And Others Would Be Very Disadvantageous To The Site.The Black Approach Is A Better Option As It Intends To Block Some Specific Sites That Are Considered The Worst Offenders. A Website Owner Has To Find Out If Hisher Website Is On An Apache Server And If The Use Of .htaccess Is Allowed By Them. A Simple Email To The Web Space Provider Will Provide A Swift Answer. The .htaccess File Should Go Into A Websites Root Directory On Ones Web Server.Verification That Everything Is Working Properly On Ones Site Has To Be Done. Mod-rewrite Is Very Powerful But It Only Needs One Typo For Hell To Break Loose. The Block Listed Sites Should Be Checked Out If The Stop Image Is Being Shown. It Might Be A Nice Twist To Include Ones URL On The Image. It Wouldnt Hurt To Get Some Free Advertising In The Process.This Is How To Disable Hot Linking Of Certain File Types On Ones Site Through .htaccess By Simply Adding The Code Below To Ones .htaccess File. Uploading The File Either To The Root Directory Or A Particular Subdirectory Is Necessary To Localize The Effect To Just One Section Of The Site.RewriteEngine OnRewriteCondHTTPREFERER!RewriteCondHTTPREFERER!http:(www.)?mydomain.com.NCRewriteRule.(gifjpgjscss)-FThe My Http:domain.com Is To Be Replaced By Ones Own. The Above Code Creates A Failed Request When Hot Linking Of The Specified File Types Occurs. A Broken Image Is Shown In Case Of The Image.To Block Traffic From A Single Referrer:RewriteEngine OnOptionsFollow-SymlinksRewriteCondHTTPREFERERbadsite.comNCRewriteRule.-FTo Block Traffic From Multiple Referrers:RewriteEngine OnOptionsFollow-SymlinksRewriteCondHTTPREFERERbadsite.comNC.ORRewriteCondHTTPREFERERanotherbadsite.comRewriteRule.-FJavaScript Can Be Used To Prevent Right-clicking An Image When Already In A Browser. This Is A Very Weak Defense Though As People Just Need To Switch JavaScript Off Andor Use A Decent Browser And Its All There. Using JavaScript To Write Images Into A Page Does Not Offer Sufficient Protection As Hotlinkers Can Easily Link To Images Once They Know The Origin URL.FileProt Is A Protection Script That Is Simple To Set Up And Use. It Does Not Allow Anyone Coming From Unauthorized Places Access To Certain Files In Ones Web Server. This Allows For The Specification Not Only Of Unauthorized Domains But Pages In Ones Domain As Well. It Can Be Specified To Allow File Or Image Download From Certain Pages In Ones Domain. Hotlinkers And Bandwidth Leeches Are Completely Blocked But This Script Is Not Intended For Super High-traffic Sites.Download Tracker Is A CGI Script That Manages Downloads From Ones Web Page. Options Include Requests For Email Address And Anti-leech System. It Is Multi-platform Compatible And Has A Back-end Control Panel.