• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI Folders

#11
[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>

#12
[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)
--&gt; .htaccess
--&gt; 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
where there is one user and password per line and the password is not simply plain-text, but an MD5 hash.

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.

#13
[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?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.