如何从一个子目录中删除的.htaccess密码保护 [英] How to remove .htaccess password protection from a subdirectory

查看:194
本文介绍了如何从一个子目录中删除的.htaccess密码保护的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有密码保护我使用的.htaccess整个网站,但我想揭露子目录中的一个,它可以无需密码即可查看。

如何我可以禁用htaccess的密码保护的子目录?具体是什么的.htaccess语法。

下面是摆在我的FTP根目录

我的.htaccess文件

AuthName指令网站Administratrion
的AuthUserFile /dir/.htpasswd
目录AuthGroupFile的/ dev / null的

AuthName指令安全
与AuthType基本
需要用户用户名1
为了允许,拒绝
允许所有

解决方案

您需要创建所需的目录中新的的.htaccess 文件,包括满足任何指令在里面,像这样:

 #任何用户都可以看到这个目录
满足任何
 

请注意,在阿帕奇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:

# allows any user to see this directory
Satisfy Any

Please note that the syntax changed in Apache 2.4, this should have the same effect

Require all granted

这篇关于如何从一个子目录中删除的.htaccess密码保护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆