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!
how to prevent the anonymity downloading the ppt files ?
Moderator: General Moderators
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: how to prevent the anonymity downloading the ppt files ?
Password protected? User has to login before file can be downloadedphper2000 wrote:how to make it
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: how to prevent the anonymity downloading the ppt files ?
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
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