Apache write.htaccess可使文件夹中的所有文件和文件夹在维护模式(403(禁止模式))下提供给我的网站?

Apache write.htaccess可使文件夹中的所有文件和文件夹在维护模式(403(禁止模式))下提供给我的网站?,apache,.htaccess,cpanel,Apache,.htaccess,Cpanel,我在cPanel中有以下文件结构 web_root_folder_ |____.neverDelete/_____ | |_____img/logo-30.png | |_____js/error-page.js | |_____css/error-page.

我在cPanel中有以下文件结构

web_root_folder_
               |____.neverDelete/_____
               |                     |_____img/logo-30.png
               |                     |_____js/error-page.js
               |                     |_____css/error-page.css
               |
               |____403.shtml
               |
               |____.htaccess
我想用一些代码编写
.htaccess
,使网站处于“维护模式”。 所以…我写了
403.shtml
页面,它使用外部css、javascript和存储在
.neverDelete
文件夹中的图像

我在
.htaccess

# The WORKING CODE (Too Long Thanks to @CBroe

In the
.htaccess
file, we can't use a
<Directory>
container, since the
.htaccess
file itself defines the directory.

Since
.htaccess
defines the directory...we can put a
.htaccess
file in the
.neverDelete/
directory with the following code

Allow from all
#由于@CBroe,工作代码太长

.htaccess
文件中,我们不能使用
容器,因为
.htaccess
文件本身定义了目录

由于
.htaccess
定义了目录…我们可以使用以下代码将
.htaccess
文件放入
.neverDelete/
目录中


这将使
.neverDelete/
目录的内容始终可用。

“我不知道为什么它不起作用”-因为该指令在上下文中有效。抱歉,无法理解您刚才所说的内容…问题在于.htaccess中的语法吗?还是该代码本身的使用完全无效“Context:server config,virtual host”如果您不知道这是什么意思,请单击
Context
,这将导致解释。谢谢您的额外澄清,先生。您的澄清帮助我获得了完整的答案。