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 hjMore Information:
- In the event that a pro tries to hack in by spoofing the http referer header, does it do any good to rename the wordpress installation file to something
- Use the following form to create the code to place into your htaccess file to stop people hotlinking your images/files
- The exact file extension to use depends on your web server
- Referrer bouncer uses one php file that checks incoming referrers
- htaccess file below prevent a password (which was set with the WebPassword
- At best, it will only render your log files useless
- They operate like this: Let's say you have some mp3 files on a server, and SOMEWHERE on the web there is a link to that mp3 file's location
More:


LinkBack URL
About LinkBacks
Reply With Quote

























































Bookmarks