我使用 .htaccess 密码保护了我的整个网站,但我想公开其中一个子目录,以便无需密码即可查看.
如何禁用子目录的 htaccess 密码保护?具体是什么 .htaccess 语法.
这是我的 .htaccess 文件,它位于我的 ftp 的根目录中.
AuthName "站点管理"AuthUserFile/dir/.htpasswdAuthGroupFile/dev/nullAuthName 安全AuthType 基本需要用户名 1命令允许,拒绝允许所有人 解决方案您需要在所需目录中创建一个新的 .htaccess 文件并包含 Satisfy any 指令像这样,直到 Apache 2.3:
# 允许任何用户看到这个目录满足任何Apache 2.4 中的语法发生了变化,这具有相同的效果:
要求所有授予I have password protected my entire website using .htaccess but I would like to expose one of the sub directories so that it can be viewed without a password.
How can I disable htaccess password protection for a sub directory? Specifically what is the .htaccess syntax.
Here is my .htaccess file that is placed in the root of my ftp.
AuthName "Site Administratrion" AuthUserFile /dir/.htpasswd AuthGroupFile /dev/null AuthName secure AuthType Basic require user username1 order allow,deny allow from all解决方案
You need to create a new .htaccess file in the required directory and include the Satisfy any directive in it like so, for up to Apache 2.3:
# allows any user to see this directory Satisfy AnyThe syntax changed in Apache 2.4, this has the same effect:
Require all granted
更多推荐
如何从子目录中删除 .htaccess 密码保护
发布评论