LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] block by referrer

[ILUG] block by referrer

Gary Coady gary at netsoc.tcd.ie
Tue Aug 10 11:32:23 IST 1999


On Tue, Aug 10, 1999 at 10:22:21AM +0000, Rob Hill wrote:
> If I was going the cgi route, the cgi would just check the referrer, and
> give out the file based on that (much easier) but i was hoping that
> there would be an easier (apache) method, as the site's not
> mine, and I would have to write the cgi, as the person involved
> er......couldn't.

I think you might be able to use mod_rewrite

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://your.site/.*$ [NC]
RewriteRule .*\.mp3$        -                       [F]

That is, if there is a HTTP referer, and it's not from your site, then
forbid access to all MP3s. Well that's completely untested, and basically
comes from http://www.engelschall.com/pw/apache/rewriteguide/
But it should be possible.

-- 
Gary Coady - gary at netsoc.tcd.ie - http://www.netsoc.tcd.ie/~gary/
|  It might look like I'm doing nothing, but at the cellular level I'm
|  really quite busy.

Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell