Password protect a directory with basic HTTP authentication. This only works on Apache servers.
1 Enter the path to the directory that you want to protect. Something like: home/usr/websites. If you have no idea what this is, you can save this php code <?php echo dirname (__FILE__); ?> to a file with the extention .php and upload it to the directory that you want to protect. Go to the file in your browser and you should see the path to that directory. Copy and paste it here.
home/usr/websites
<?php echo dirname (__FILE__); ?>
.php
2 Enter a display message to the user.
3 Enter usernames and passwords that can access the directory. username password username password username password Type the username and password, separated by a space, on one line. Enter one username/password combination per line. Enter at least one username/password combination.
Sign Up to receive Updates, Freebies, Coupons, Themes and Free E-Books! View Sample eBook