Old 04-25-2005   1 links from elsewhere to this Post. Click to view. #1 (permalink)
Tech Support
 
Man1c M0g's Avatar
 
Tournaments Won: 1

Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,202
Blog Entries: 21
Images: 3

Send a message via ICQ to Man1c M0g Send a message via MSN to Man1c M0g Send a message via Skype™ to Man1c M0g
Prevent Image Hotlinking

This is a thread to discuss the Prevent Image Hotlinking tutorial. Please keep all posts on-topic, don't spam, and read the entire thread BEFORE you post - any issues you have could be answered deeper within the thread.
__________________
Man1c M0g is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2005   #2 (permalink)
starlova
Guest
 

Posts: n/a

Talking Thank you!!

oooo. Thank you so much for putting this tutorial up. Thanks
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-02-2005   #3 (permalink)
entity
Guest
 

Posts: n/a

Hey there, I keep getting problems with image hotlinking, for some reason it wont bring up the image that I selected! I am using the code exactly like it's written, but it wont put the image up, but it just displays a broken link, please help!

Last edited by entity; 09-02-2005 at 12:49 PM.
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-02-2005   #4 (permalink)
Tech Support
 
Man1c M0g's Avatar
 
Tournaments Won: 1

Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,202
Blog Entries: 21
Images: 3

Send a message via ICQ to Man1c M0g Send a message via MSN to Man1c M0g Send a message via Skype™ to Man1c M0g
My advice is to check absolutely everything. Check the image URL to make sure that it works independantly of the script, check the exact spelling of the file (Linux is case sensitive), ensure that you are running Apache, and make sure the image itself isnt in the directory thats being excluded from outside referrers!

PS. If this still doesn't work, post your code here so we too can take a peek and perhaps work out what's going wrong...
__________________
Man1c M0g is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-03-2005   #5 (permalink)
entity
Guest
 

Posts: n/a

Quote:
Originally Posted by Man1c M0g
My advice is to check absolutely everything. Check the image URL to make sure that it works independantly of the script, check the exact spelling of the file (Linux is case sensitive), ensure that you are running Apache, and make sure the image itself isnt in the directory thats being excluded from outside referrers!

PS. If this still doesn't work, post your code here so we too can take a peek and perhaps work out what's going wrong...
OK I still can't figure out whats wrong, so I'm gonna post up the whole code so you can see if you can see if theres anything I can change

Code:
ErrorDocument 301 http://entity.thehostmansion.com/301error.php
ErrorDocument 302 http://entity.thehostmansion.com/302error.php
ErrorDocument 400 http://entity.thehostmansion.com/badsyntax.php
ErrorDocument 401 http://entity.thehostmansion.com/unauthpage.php
ErrorDocument 403 http://entity.thehostmansion.com/forbiddenpage.php
ErrorDocument 404 http://entity.thehostmansion.com/404error.php
ErrorDocument 405 http://entity.thehostmansion.com/405error.php
ErrorDocument 408 http://entity.thehostmansion.com/408error.php
ErrorDocument 415 http://entity.thehostmansion.com/415error.php
ErrorDocument 500 http://entity.thehostmansion.com/500error.php
ErrorDocument 501 http://entity.thehostmansion.com/501error.php
ErrorDocument 502 http://entity.thehostmansion.com/502error.php
ErrorDocument 503 http://entity.thehostmansion.com/503error.php
ErrorDocument 504 http://entity.thehostmansion.com/504error.php
ErrorDocument 505 http://entity.thehostmansion.com/505error.php
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?entity.thehostmansion.com(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?neoseeker.com(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?spirasdestiny.ffultima.net(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?s3.invisionfree.com/Spiras_Destiny(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?hotmail.com(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?finalgaming.net(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?network.finalgaming.net(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?forums.biorust.com(/)?.*$     [NC]
RewriteRule \.(gif|bmp|png|PNG|css|htm|html|php)$ http://entity.thehostmansion.com/hotlink.jpg [R,L]
redirect /scripts http://www.stoptheviruscold.invalid
redirect /MSADC http://www.stoptheviruscold.invalid
redirect /c http://www.stoptheviruscold.invalid
redirect /d http://www.stoptheviruscold.invalid
redirect /_mem_bin http://stoptheviruscold.invalid
redirect /msadc http://stoptheviruscold.invalid
RedirectMatch (.*)\cmd.exe$ http://stoptheviruscold.invalid$1
RewriteEngine On 
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR] 
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR] 
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR] 
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR] 
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR] 
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR] 
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR] 
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR] 
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR] 
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR] 
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR] 
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR] 
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR] 
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR] 
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR] 
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR] 
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR] 
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR] 
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR] 
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR] 
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR] 
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR] 
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR] 
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR] 
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR] 
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR] 
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR] 
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR] 
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR] 
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] 
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] 
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] 
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] 
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR] 
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR] 
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Zeus 
RewriteRule ^.* - [F,L]
<Files .htaccess>
order allow,deny
deny from all
</Files>
It's a big file I know, but please help
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-03-2005   #6 (permalink)
Tech Support
 
Man1c M0g's Avatar
 
Tournaments Won: 1

Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,202
Blog Entries: 21
Images: 3

Send a message via ICQ to Man1c M0g Send a message via MSN to Man1c M0g Send a message via Skype™ to Man1c M0g
Well, in your code you have:

RewriteCond %{HTTP_REFERER} !^http://(www\.)?forums.biorust.com(/)?.*$ [NC]
whereas the actual code is supposed to be:
RewriteCond %{HTTP_REFERER} !^http://(www\.)?forums\.biorust\.com/.*$ [NC]

Notice the missing ? and the forward slash before every fullstop in the domain/subdomain name? Syntax in this file is, i'm afraid, very important. My advice is to use my example as a template and build on it stepwise from there. When something stops working, then you know where you have gone wrong...
__________________
Man1c M0g is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-04-2005   #7 (permalink)
entity
Guest
 

Posts: n/a

Question

OK, but do I have to add the '\' to the image to appear when some one hotlinks my images?
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-02-2006   #8 (permalink)
Registered User
 
robin746's Avatar
 

Join Date: May 2006
Location: Eire
Posts: 48

Handy tutorial, though I wouldn't call mod_rewrite "a little known module". It is very useful however, and anyone with a decent web host can access it. On many turnkey systems it will be part of your web control panel, so just because you don't have telnet access don't think this method is out of bounds to you!
__________________
"out of environment space"
robin746 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-17-2007   #9 (permalink)
Registered User
 
supafly's Avatar
 

Join Date: May 2004
Location: Preston England on the west side
Posts: 290
Images: 26

Send a message via MSN to supafly
I have a question hope it's ok to post but if you had a website that is like

fernandoalonsofan.com/gallery how would you write that in? (is totally cluless when it comes down to things like this)
__________________
supafly is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://forums.biorust.com/tutorial-commenting-system/1675-prevent-image-hotlinking.html
Posted By For Type Date
BioRUST.com :: Tutorials >> Prevent Image Hotlinking This thread Refback 11-19-2007 10:17 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you make a anti hotlinking ..htaccess file? supafly HTML / PHP / ASP / JS 3 01-17-2007 05:56 PM
Shape one image to another? Phoenix Wynde General Discussions 3 12-22-2006 11:44 PM
Wire Image Anna24 Photography & Photo Manipulation 0 12-03-2006 05:44 AM
TUT: Image Rotation (image changes everytime page refreshs) allstar Tutorial Submission 4 06-03-2006 08:32 PM
Recreating my own image... Sirit Adobe Photoshop 7 05-13-2006 06:41 AM


All times are GMT +1. The time now is 03:36 AM.

Powered by vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT