Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Modifications    Mod Requests and Support  ›  Stop users hotlinking to uploads. Moderators: 10 Series Support Team
Users Browsing Forum
Googlebot and 1 Guests

Stop users hotlinking to uploads.  This thread currently has 648 views. Print
1 Pages 1 Recommend Thread
iCONICA
June 27, 2008, 5:29pm Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,431
Gender: Male
Posts Per Day: 0.96
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 16 days 2 hours 20 minutes
Location: Manchester UK
This is a tiny mod so people can stop other sites stealing their bandwidth via hot linking to their files.


I recently had a user upload a 10MB audio track to my "music" section he wrote a quick post to make it look legit, I then found he first clicked the download link to download it then when your taken to the download page built into the E-Blah software, there is a link to "click after 5 seconds if your download does not begin automatically" that "click here" is the file link itself, which he put in a link on another site for download. Stealing my bandwidth without sending me any visitors...

Anyway this can be fixed by uploading a .htaccess file using mod_rewrite to your uploads folder.

I've already added the most common file extensions. It will block them from being accessed by any other referrer other than your own, Simply change i-conica.net to your own url.
don't include www. that way it will cover any sub domain of yours also, allowing them to link but not other sites.

For some reason it won't work correctly with images, It blocks them but because E-Blah resizes image it blocks them from showing. No idea why...

mod_rewrite can be confusing, i've tried, tried, tried again and failed. I eventually figured it out and tested it and it works, I'm posting this here in case anyone else has had the same problem. It is not version specific, will work with any eblah version.

Hope someone finds this useful...





Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM
Martin
June 28, 2008, 12:20am Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
Posts: 5,171
Gender: Male
Posts Per Day: 1.97
Reputation: 98.41%
Reputation Score: +247 / -4
Time Online: 39 days 9 hours 4 minutes
Location: UK
Age: 53
Can't download it for some reason. Error says "you don't have permission to download this file" ????

Justin, what may be causing this ?



Martin's Reputation: Increase
Logged
Site Site Private Message Private message Reply: 1 - 9
iCONICA
June 28, 2008, 1:16am Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,431
Gender: Male
Posts Per Day: 0.96
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 16 days 2 hours 20 minutes
Location: Manchester UK
Ah.... That would be the full stop before the htaccess file name, Sorry about that.

I'll re upload.

Delete the above attachment.

I've renamed the .htaccess file "htaccess.txt" Just changed the file name back after unzipping.  



This post contains attachments; to download them you must login.



Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 2 - 9
iCONICA
June 28, 2008, 1:30am Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,431
Gender: Male
Posts Per Day: 0.96
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 16 days 2 hours 20 minutes
Location: Manchester UK
To add, Little description I missed...

Usually mod_rewrite will replace a requested image with an alternate "Please do not hotlink to my files" image, That doesn't really help...

This one, will redirect ANY request for any of the listed file extensions from a referrer other than your own domain, to the home page of your site.

The .htaccess file will be effective against any directory below it. To cover your entire domain, place in your root. (the highest level you have access to)

Example...

Try clicking the below link, That is a real link that is accessed by my download page. To you, it will simply take you to my home page.

http://i-conica.net/download/software/image-video-editing/photoshop/ADBEPHSPCS3_WWE.exe


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 3 - 9
tron
June 29, 2008, 12:29am Report to Moderator Report to Moderator

E-Blah Member
Posts: 7
Posts Per Day: 0.01
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 13 hours 2 minutes
I could still right click and 'save target as..'  or is doing that behind the scope of the .htaccess?
Logged Offline
Private Message Private message Reply: 4 - 9
Martin
June 29, 2008, 3:56am Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
Posts: 5,171
Gender: Male
Posts Per Day: 1.97
Reputation: 98.41%
Reputation Score: +247 / -4
Time Online: 39 days 9 hours 4 minutes
Location: UK
Age: 53
This is to stop people linking directly to your images/downloads and stealing your bandwidth.

You can run scripts to disable Right Click but it isn't worth it, they are just a deterent, if somebody wants your image they will get it.



Martin's Reputation: Increase
Logged
Site Site Private Message Private message Reply: 5 - 9
iCONICA
June 29, 2008, 7:47am Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,431
Gender: Male
Posts Per Day: 0.96
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 16 days 2 hours 20 minutes
Location: Manchester UK
@ tron, The point of using this is to stop people linking to your files from their site, not yours. it doesn't stop downloading from your site, it simply redirects the user to your home page only when files are linked to from other sites. when the referrer isn't your domain.



You can use JavaScript to prevent right clicking, but as martin pointed out, its just annoying rather than protecting anything...


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 6 - 9
tron
June 29, 2008, 2:23pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 7
Posts Per Day: 0.01
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 13 hours 2 minutes
Thanks for the extra clarification!  
Logged Offline
Private Message Private message Reply: 7 - 9
Ronymon
February 21, 2009, 4:45pm Report to Moderator Report to Moderator

Manners makes the man
Posts: 248
Gender: Male
Posts Per Day: 0.13
Reputation: 100.00%
Reputation Score: +5 / -0
Time Online: 3 days 14 hours 16 minutes
Location: Brighton,England
Age: 35
Quoted from Martin
This is to stop people linking directly to your images/downloads and stealing your bandwidth.

You can run scripts to disable Right Click but it isn't worth it, they are just a deterent, if somebody wants your image they will get it.


Thats the whole point .if someone really want , then he can really download it.. there are many ways



Logged Offline
Site Site Private Message Private message Reply: 8 - 9
iCONICA
February 22, 2009, 5:43am Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,431
Gender: Male
Posts Per Day: 0.96
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 16 days 2 hours 20 minutes
Location: Manchester UK
Quoted from Ronymon


Thats the whole point .if someone really want , then he can really download it.. there are many ways



Don't confuse martin's point about right click disabling not blocking image grabbing, and my mod_rewrite above.
My mod_rewrite WILL stop people hotlinking to the files specified in the rules. Nothing anyone can do about it.


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 9 - 9
1 Pages 1 Recommend Thread
Print

E-Blah Community    Modifications    Mod Requests and Support  ›  Stop users hotlinking to uploads.

Thread Tags