有子目录中没有使用Apache的的.htaccess进行密码保护密码保护、目录中、Apache、htaccess

2023-09-02 00:49:48 作者:我把她当命她当我有病。

目前我的服务器我在我的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的方式。我看到这个答案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.

这为我工作。