Forum Moderators: phranque

Message Too Old, No Replies

Protect download file

         

webstyler

1:30 pm on Aug 16, 2011 (gmt 0)

10+ Year Member



Hello

What I need is to deny download file from any IP but permit usage is request is not direct from user

so

If user open page the file can be called from page, server side
If user open the file link can't be download it

Possible ?

tx

phranque

7:15 am on Aug 17, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you can Detect blank referrer in RewriteCond:
http://www.webmasterworld.com/apache/3391260.htm [webmasterworld.com]

however, beware that some visitors will have a configuration that blocks the HTTP Referer header.
so effectively with a blank or spoofed Referer you can't really determine if it is a direct or (self-)referred request.