本文介绍了密码保护目录中的.htaccess的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好我想密码保护的目录与htaccess的。 我创建了一个htpasswd的文件,并在服务器的根目录保存它。 我在目录中创建一个.htaccess文件我想保护与下面几行:
Hi I am trying to password protect a directory with .htaccess. I have created a .htpasswd file and stored it at the root of the server. I have created a .htaccess file in the directory I want to protect with the following lines:
AuthUserFile /home/baltzers/domains/baltzersciencepublishers/.htpasswd AuthGroupFile /dev/null AuthType Basic AuthName "restricted area" require user test
但是,当我填写了用户名(加密)密码,它不断抛回了身份验证对话框。 我在想什么?
But when I fill in my username and (encrypted) password, it keeps throwing back up the authentication dialog. What am I missing?
推荐答案您mught要替换的行要求用户测试与
You mught want to replace the line require user test with:
require valid-user
否则,用户必须被命名为测试和存在于 htpasswd的文件。
更多推荐
密码保护目录中的.htaccess
发布评论