bmdsherman Posted September 7, 2009 Share Posted September 7, 2009 Is there any way I can use .htaccess to only allow people who are "logged in" (having a registered php session) to see the files in a directory? Link to comment https://forums.phpfreaks.com/topic/173465-htaccess-only-allow-people-to-see-a-file-if-they-are-logged-in/ Share on other sites More sharing options...
cpace1983 Posted September 8, 2009 Share Posted September 8, 2009 I think the best way would be to redirect those requests to a PHP script, which will then fetch the files if the user is logged in. Apache can be configured to use a database for .htaccess, but I don't believe Apache has the ability to encrypt/decrypt the passwords (which I'm assuming you need). If you don't need encryption, this might be the ticket here: http://www.linuxhelp.net/guides/htaccessmysql/ Link to comment https://forums.phpfreaks.com/topic/173465-htaccess-only-allow-people-to-see-a-file-if-they-are-logged-in/#findComment-914440 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.