CI Folders |
[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>
[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.
[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/contr...wnload.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? |
Welcome Guest, Not a member yet? Register Sign In |