Password protection For Directory - Htaccess

Password protection

Snippet Code

Rate this page :
  [ 0 votes]

This code about password protection for directory.Copy, Paste this htaccess code in .htaccess file and place this file under directory for which you want to protect. And paste the .htpasswd code in .htpasswd file and place it under folder for which mentioned in AuthUserFile.

.htaccess ---------- AuthType Basic AuthName " admin" AuthUserFile /home/test/password/.htpasswd Require user admin .htpasswd ---------- admin:$kjl$1e$fd0h...$NvYe1


Ask Questions

Ask Question