Page 1 of 2

Prevent Hotlinking and Bandwidth Theft

Posted: 24 Mar 2010, 22:00
by Stoker
Prevent Hotlinking and Bandwidth Theft

Moved: viewtopic.php?f=45&t=1306

Re: Prevent Hotlinking and Bandwidth Theft

Posted: 24 Mar 2010, 22:03
by cisco007
thanks, that was fast!

[edit]so like the post said, is this only for uploaded attachments? How can i protect other files, lets say a .flv that i have in another folder so that no one can use it only my site? can i use something like this!?[/edit]

Re: Prevent Hotlinking and Bandwidth Theft

Posted: 25 Mar 2010, 21:55
by Fire-Fox
Great mod.

Working like it should :)

Re: Prevent Hotlinking and Bandwidth Theft

Posted: 25 Mar 2010, 21:58
by Fire-Fox
cisco007 » 24 Mar 2010, 21:03 wrote:thanks, that was fast!

[edit]so like the post said, is this only for uploaded attachments? How can i protect other files, lets say a .flv that i have in another folder so that no one can use it only my site? can i use something like this!?[/edit]

I would think so...

Do the same steps but the the flv folder instead, while putting the .htaccess on the flv folder and change the script so it fits :)

Re: Prevent Hotlinking and Bandwidth Theft

Posted: 25 Mar 2010, 22:02
by Stoker
Yes, upload a htaccess file to the folder where the flv files is located:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+.)?phpbb3bbcodes.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(flv)$ ../stop.gif [L]
Note that I just changed php with flv

Re: Prevent Hotlinking and Bandwidth Theft

Posted: 25 Mar 2010, 22:06
by cisco007
i have done it, and it don't work! Maybe have something to do with my server!

Re: Prevent Hotlinking and Bandwidth Theft

Posted: 25 Mar 2010, 22:13
by Stoker
I think it is because the flv is cached in your browser.
Try post one in the testforum.

Re: Prevent Hotlinking and Bandwidth Theft

Posted: 26 Mar 2010, 00:55
by Fire-Fox
Thanks for the mod stoker :)

Re: Prevent Hotlinking and Bandwidth Theft

Posted: 26 Mar 2010, 14:10
by IpHeX
Great mod, thank you for sharing. :)

Re: Prevent Hotlinking and Bandwidth Theft

Posted: 26 Mar 2010, 19:36
by Stoker
Stoker » 25 Mar 2010, 21:13 wrote:I think it is because the flv is cached in your browser.
Try post one in the testforum.
:beat: