TL;DR : ISPConfig 的自定义错误页面是这些重定向的原因。
我们在 ISPConfig 环境中安装了 Apache 2.4。
每个虚拟主机都有一个用于管理目的的目录。我的 .htaccess 如下所示:
AuthType Basic
AuthName "Administration"
Require valid-user
AuthUserFile /etc/apache2/.htpasswd
现在,当我点击该文件夹时,http://mysite.tld/admin
我会在没有登录提示的情况下重定向到网站根目录。但是,当我将 .htaccess 复制到根目录时,我得到了登录提示。
当我点击时,日志文件包含以下几行/admin
:
[Wed Feb 12 12:00:23 2020] [authz_core:debug] mod_authz_core.c(809): AH01626: authorization result of Require valid-user : denied (no authenticated user yet)
[Wed Feb 12 12:00:23 2020] [authz_core:debug] mod_authz_core.c(809): AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
然后我直接重定向到/
.
那么重定向的原因可能是什么?
先感谢您!
! cross-post from serverfault because of its urgency !