CodeIgniter Forums
password protected directory help - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: password protected directory help (/showthread.php?tid=11252)



password protected directory help - El Forum - 09-01-2008

[eluser]bigdaddysheikh[/eluser]
Hey guys,

I am trying to password protect a directory. It is easy to setup using cpanel with .htaccess file. In this case, my clients wants to add users and have a management area to control the users. The reason being is that he has a store for wholesalers that should only be available to certain users.

I was searching online and have found an easy method of adding username/password in a simple file then upload.

What I would like to do is set up a way where the htaccess can verify the users in the mysql database and only then allow them to go to the store?

I found some really good articles to help with this but I am concerned if a visitor puts direct url to a product, he might bypass the authentication.

Has anyone every run into this problem before?


password protected directory help - El Forum - 10-23-2009

[eluser]JoostV[/eluser]
The most secure and userproof way to protect a directory is to simply have a controller and use an authenticating system to restrict access. There are many out-of-the-box Codeigniter auth systems that you can easily drop into your CI application. You can search for them on these forums or in the wiki.