
September 5th, 2000, 05:59 AM
|
|
Junior Member
|
|
Join Date: Sep 2000
Location: UK
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I need to protect a particular file from being downloaded except from a particular page. I tried to do this by using .htaccess:
SetEnvIfNoCase referer http://foobar.com good_referer=1
...
allow from good_referer=1
(syntax is not exact but you get the idea)
This seems to work fine with netscape, but with IE the file is not accessible even from the correct referring page.
1. Is there a reason why this should be?
2. Is there an alternative way to do it?
In particular, at the moment I use an (ugly) perl solution: I copy the files to a temporary directory with a random name - file47483973589.txt for example, and then link to these rather than the original. This means they are accessible but hard to guess, and regular deleting of old temp files should keep things tidy. I would like to use symbolic links instead of copies, but when I tried this, apache wouldn't let the files be downloaded - I guess it wouldn't follow the symlink. If anyone can suggest how I might make this work, I'd be grateful too.
cheers
dave hj
|