![]() |
CI Folders - 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: CI Folders (/showthread.php?tid=25950) Pages:
1
2
|
CI Folders - El Forum - 01-02-2010 [eluser]JanDoToDo[/eluser] Dave_C - I tried adding that files snippet but again it doesnt work. It just loads the download page without asking for user/pass: and in the directory is: Controllers home.php view.php +SubFolder (and the subfolder contains the .htaccess and download.php as well as all the other controllers for the subsite) --> .htaccess --> download.php <Files download.php> AuthType Basic AuthName "Software Download" AuthUserFile "/home/squaresa/.htpasswds/public_html/lintel/passwd" Require valid-user </Files> CI Folders - El Forum - 01-02-2010 [eluser]David Cassidy[/eluser] [quote author="JanDoToDo" date="1262454886"]Dave_C - I tried adding that files snippet but again it doesnt work. It just loads the download page without asking for user/pass: and in the directory is: Controllers home.php view.php +SubFolder (and the subfolder contains the .htaccess and download.php as well as all the other controllers for the subsite) --> .htaccess --> download.php <Files download.php> AuthType Basic AuthName "Software Download" AuthUserFile "/home/squaresa/.htpasswds/public_html/lintel/passwd" Require valid-user </Files>[/quote] Passwords are generally stored in a file named .htpasswd in the format of Code: user:password Once you've got your .htpasswd file straightened out, make sure the AuthUserFile portion in your Files directive is correct and that the mod_auth module is installed and enabled in Apache. Also, you should ensure your password file isn't in a public directory. Instead, you should place it in a directory above the root documents folder for security purposes. CI Folders - El Forum - 01-02-2010 [eluser]JanDoToDo[/eluser] Dave, the problem seems to be: If i go to the actual filepath of the file in the browser it asks for the password, i.e. http://domain.com/fold/application/controllers/sub/download.php it asks for the password. But if i go to the CI path, i.e. http://domain.com/sub/download it doesnt ask for the user/pass. Is there a solution? |