musclehead Posted October 14, 2008 Share Posted October 14, 2008 I'm looking for a solution to password-protecting files and/or folders without using .htaccess. I have it setup currently w/ a basic authentication and session model. User "A" logs in and is redirected to the "protected" page w/ session handling to prevent users from getting their directly. However, I have PDF files linked from that protected page which could be easily linked to without logging in. Any ideas? Link to comment https://forums.phpfreaks.com/topic/128415-php-file-security-without-htaccess/ Share on other sites More sharing options...
Orio Posted October 14, 2008 Share Posted October 14, 2008 You can save the PDF data in a database and when someone accesses "show_file.php?filename=abc.pdf" show it's contents only if they are authorized. This can be done in a much nicer way using mod rewrite but you said no htaccesses... Orio. Link to comment https://forums.phpfreaks.com/topic/128415-php-file-security-without-htaccess/#findComment-665371 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.