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

kevin lyda kevin at suberic.net
Tue Aug 10 11:10:03 IST 1999


Rob Hill spoke thusly:
>Is it possible, using Apache, to block access to a local website if the browse
>r accessing the files is coming from a particular site?
>Someone copied a users website and is sending viewers to the original site for
> large files (mp3's vids etc)...when asked to remove it, the response was a po
>lite "fuck you".

no, but a cgi (or similar) script might work:

lets say a page has this structure:

   foo.html (contains foo.mp3)

foo.html could become foo.cgi that updates a file with a key, and the
mp3 link could become foo.mp3.cgi?key.  when that link gets followed
the foo.mp3.cgi link could remove the key and deliver the mp3 file.
if the key passed to the foo.mp3.cgi file was invalid, it would fail.

i'm sure there are more efficient varients on the theme (instead of a
key in a file, it could be a file in a directory; some sort of server
side includes could be used (shtml?), etc.), but that's the general
solution that springs to mind.

less exact would be to change the name of the mp3 file every few
hours with a cron job and update the html file with the correct name.
sed is your friend here.

kevin




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