The folder or the page on the sever can be prevented from the unauthenticated user using .htacess and .htpasswd files.
The .htaccess will look like this.
AuthName “Restricted Area”
AuthType Basic
AuthUserFile /path/of/your/folder/to/be/protected/.htpasswd
AuthGroupFile /dev/null
require valid-user
you should keep .htpasswd and .htaccess file under the directory/parent folder of the file which you want to protect from the unauthorized users.
.htpasswd file will contain username and password in the following format.
userName:password
[...] Authentication [...]
By: About .htaccess « Uttam Kumar on March 25, 2008
at 7:06 am