Posted By

stephcode on 05/18/11


Tagged

password htaccess


Versions (?)

.htaccess Password Protect


 / Published in: PHP
 

URL: http://tools.dynamicdrive.com/password/

  1. For server path info, save as phpinfo.php:
  2.  
  3. <?php
  4. ?>
  5.  
  6. .htaccess:
  7.  
  8. AuthName "Restricted Area"
  9. AuthType Basic
  10. AuthUserFile /home/path/to/folder/.htpasswd
  11. AuthGroupFile /dev/null
  12. require valid-user
  13.  
  14. .htpasswd in root dir:
  15.  
  16. admin:[encrypted password]
  17.  
  18. Generate encrypted password here: http://tools.dynamicdrive.com/password/

Report this snippet  

You need to login to post a comment.