有子目录中没有使用Apache的的.htaccess进行密码保护 [英] Have sub directory not be password protected using Apache's .htaccess

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

问题描述

目前我的服务器我在我的web目录的根目录.htaccess文件 -

Currently on my server I have a .htaccess file in the root of my web directory -

AuthUserFile /path/to/root/www/.htpasswd
AuthType Basic
AuthName "Economic Complexity Observatory"
Require valid-user`

和这个伟大的工程正确的密码保护我的整个网站。唯一的问题是,我有这样的一个子目录,我不想进行密码保护。有没有一种方法来指定一个特定的目录将是免费的密码保护?

And this works great properly password protecting my whole site. The only problem is that I have this one sub directory that I DON'T WANT to to be password protected. Is there a way to specify that one specific directory will be free of password protection?

推荐答案

现在只是使用的.htaccess的方式。我看到这个答案<一个href="http://www.electrictoolbox.com/apache-remove-password-protection-subdirectory/">elsewhere

There is a way just using .htaccess. I saw this answer elsewhere

刚刚创建的内容的非受密码保护的子目录中的.htaccess文件:

Just create an .htaccess file in the non-password protected subdirectory with the content:

Satisfy any

,就是这样。

and that's it.

这为我工作。

这篇关于有子目录中没有使用Apache的的.htaccess进行密码保护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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