Return to Snippet

Revision: 46379
at May 18, 2011 07:56 by stephcode


Initial Code
For server path info, save as phpinfo.php:

<?php 
  phpinfo();
?>

.htaccess:

AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /home/path/to/folder/.htpasswd 
AuthGroupFile /dev/null 
require valid-user

.htpasswd in root dir:

admin:[encrypted password]

Generate encrypted password here: http://tools.dynamicdrive.com/password/

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

Initial Description


Initial Title
.htaccess Password Protect

Initial Tags
htaccess

Initial Language
PHP