Forum Moderators: phranque

Message Too Old, No Replies

SetEnvIf question

         

hct224

11:52 pm on Feb 24, 2004 (gmt 0)

10+ Year Member



I put this code

SetEnvIfNoCase Referer "^http://www.myforumsite.com/" local_ref=1
<FilesMatch ".(gif¦jpg¦mp3¦wma)">
Order Allow,Deny
Allow from env=local_ref
</FilesMatch>

in my vhost section for a site which store *mp3,gif,jpg.. (I mean audio&graphic files) and I want this site to serve ONLY my forum(in this example is: www.myforumsite.com). after set it up, the graphic files(jpg. gif..) work fine but the audio file does not work like the way I want(receive ACCESS DENIED). I think the problem is the audio files don't sent REFERER header.
Does anyone know how to fix it?

Thanks

jdMorgan

12:33 am on Feb 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hct224,

Welcome to WebmasterWorld [webmasterworld.com]!

You'll have to allow blank referrers. See this recent thread [webmasterworld.com], starting at message #4, for some comments on referrers.


SetEnvIfNoCase Referer "^http://www\.myforumsite\.com/" local_ref
SetEnvIfNoCase Referer "^$" local_ref
<FilesMatch "\.(gif¦jpg¦mp3¦wma)$">
Order Allow,Deny
Allow from env=local_ref
</FilesMatch>

Jim

hct224

1:04 am on Feb 25, 2004 (gmt 0)

10+ Year Member



Thanks jdMorgan.
I'll try that.

hct224

2:35 am on Feb 25, 2004 (gmt 0)

10+ Year Member



jdMorgan,
I tested and seem to me it does not work. I still be able to get file from the audio site when type: [myaudiosite.com...]

Is there anyway to fix it either at my forum or at audio site?
Please know that I'm newbie. :)

Thanks

jdMorgan

4:14 am on Feb 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As stated in the thread I cited above, http_referer is not reliable. You will cut your bandwidth leakage significantly if you make it difficult to hotlink your files, even if you don't make it impossible. If you need better security, then consider some of the other methods I mentioned in that thread.

Jim

hct224

2:35 pm on Feb 25, 2004 (gmt 0)

10+ Year Member



jdMorgan,
I don't care much about security. My goal is trying to lower down the bandwidth of myserver by preventing people at other forums using our files as much as I can. So with the above setup how much(in %) bandwidth I can save? Besides that method, is there another easy way to lower the use of the bandwidth on my server?

Thank you