Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 5th, 2000, 05:59 AM
dash2 dash2 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: UK
Posts: 1 dash2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to dash2
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

Reply With Quote
  #2  
Old September 5th, 2000, 10:43 AM
RyanP
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Be careful with referrer variables, some browsers (such as Opera I believe) do not send referrer variables to the server when making a request.

Reply With Quote
  #3  
Old December 16th, 2000, 01:55 PM
coolguy23 coolguy23 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 3 coolguy23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
can someone help me with this script cuz i really need it for my server, i have alot of realmedia files and lots of ppl are leeching them, i want to be able to use this script so that only my site and a few others can access the files, thanks for any help you can provide

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > protecting a file by referer


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT