htaccess 错误:<Files> 上下文中不允许要求

Coh*_*ven 3 .htaccess phpbb3

我尝试按照本指南升级到最新版本的 phpbb3.2 ,但当我尝试访问 /install 目录时,我收到 500 内部服务器错误,并且 apache 2.4 错误日志中出现以下错误:

C:/website/forum/.htaccess: Require not allowed in <Files> context
Run Code Online (Sandbox Code Playgroud)

我尝试在谷歌上搜索“文件上下文中不允许要求”错误,但实际上没有任何结果。一定是罕见的或新引入的错误。

有问题的 htaccess 包含以下内容:

<IfModule mod_version.c>
    <IfVersion < 2.4>
        <Files "config.php">
            Order Allow,Deny
            Deny from All
        </Files>
        <Files "common.php">
            Order Allow,Deny
            Deny from All
        </Files>
    </IfVersion>
    <IfVersion >= 2.4>
        <Files "config.php">
            Require all denied
        </Files>
        <Files "common.php">
            Require all denied
        </Files>
    </IfVersion>
</IfModule>
<IfModule !mod_version.c>
    <IfModule !mod_authz_core.c>
        <Files "config.php">
            Order Allow,Deny
            Deny from All
        </Files>
        <Files "common.php">
            Order Allow,Deny
            Deny from All
        </Files>
    </IfModule>
    <IfModule mod_authz_core.c>
        <Files "config.php">
            Require all denied
        </Files>
        <Files "common.php">
            Require all denied
        </Files>
    </IfModule>
</IfModule>
Run Code Online (Sandbox Code Playgroud)

知道如何解决这个问题吗?

编辑:我使用指南中提到的命令作为安装目录步骤的替代方法并完成了指南,但即使访问根论坛网址仍然给出相同的错误,因此此问题与“install/”指令无关。

Coh*_*ven 6

AllowOverride httpd.conf 指令需要启用 AuthConfig 选项才能在 htaccess 文件中使用必需指令。

https://www.phpbb.com/community/viewtopic.php?f=556&t=2492006&p=15130746#p15130746