Hi all,
I just read the following post on excessive bandwidth use and hotlinking:
http://expressionengine.com/forums/viewthread/42606/
I didn’t want to hijack the thread so here’s my own. Like e-man in the above thread, I am unsure of where to post this but believe this may be valuable to many ee-users. I am about to build a site with lots of video feeds and my client is concerned with bandwidth use. Hotlinking could make things really bad, so I want to rule it out.
- Some sites suggest creating a simple .htaccess file and therein list the domains from which the video feeds can be accessed, i.e.
site1.org
site2.org
However, another site suggests posting the following code into the .htaccess file (I just entered some random data):
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?site1.org [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?site2.org [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
Which method is more secure? Can anyone share their understanding of this code? Any thoughts or experiences on preventing hotlinking?
