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!
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!