Page 1 of 1

how to prevent the anonymity downloading the ppt files ?

Posted: Mon Nov 14, 2011 6:53 am
by phper2000
PHP 5.3, Apache 2.2
The ppt files can be downloaded by our clients,
the ppt links like: http://www.test.com/ppt/example.ppt

before downloading, there is a function to check the clients' authority, even the clients provide the links to the anonymity , however the anonymity could not download either.

how to make it ? thanks a lot!

Re: how to prevent the anonymity downloading the ppt files ?

Posted: Mon Nov 14, 2011 3:20 pm
by social_experiment
phper2000 wrote:how to make it
Password protected? User has to login before file can be downloaded

Re: how to prevent the anonymity downloading the ppt files ?

Posted: Mon Nov 21, 2011 3:23 pm
by maxx99
PHP side:
Use rewrite mod to rewrite URL from:
/ppt/filename.ppt to e.g. /?ppt=filename.ppt
Display password form before downloading, return ppt header later and file content (if pass matches)
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

Apache side:
Use .htaccess to limit user access
http://httpd.apache.org/docs/1.3/howto/htaccess.html <- this one is old you may need to find newer one ;)