如何从子目录中删除 .htaccess 密码保护

编程入门 行业动态 更新时间:2024-10-09 18:24:58
本文介绍了如何从子目录中删除 .htaccess 密码保护的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用 .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 Any

The syntax changed in Apache 2.4, this has the same effect:

Require all granted

更多推荐

如何从子目录中删除 .htaccess 密码保护

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

发布评论

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

>www.elefans.com

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