相关疑难解决方法(0)

htaccess不起作用 - 总是密码错误

我正在尝试密码保护目录,并在目录中有两个文件应该密码保护它:

  • 的.htaccess
  • htpasswd的

.htaccess中:

###Contents of .htaccess:
AuthUserFile /var/www/html/path/to/my/directory/.htpasswd
AuthName "Protected Files"
AuthType Basic
Require user admin
Run Code Online (Sandbox Code Playgroud)

HTPASSWD:

###Contents of .htpasswd
admin:oxRHPuqwKiANY
Run Code Online (Sandbox Code Playgroud)

密码也是管理员,但无论我尝试什么密码,总是错误的.它立即再次要求输入密码!

这个配置有什么问题?

.htaccess login password-protection .htpasswd

27
推荐指数
3
解决办法
4万
查看次数

标签 统计

.htaccess ×1

.htpasswd ×1

login ×1

password-protection ×1