密码保护目录中的.htaccess

编程入门 行业动态 更新时间:2024-10-08 22:48:39
本文介绍了密码保护目录中的.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

本文发布于:2023-11-01 01:08:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547802.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:密码保护   目录中   htaccess

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!