Error handling Apache试图提供noindex.html,但403的errorhandler设置不同?

Error handling Apache试图提供noindex.html,但403的errorhandler设置不同?,error-handling,apache,httpd.conf,custom-error-handling,Error Handling,Apache,Httpd.conf,Custom Error Handling,因此,我刚刚在httpd.conf中为自定义错误页面设置了新的错误处理程序: Alias "/error" "/var/www/error/" ErrorDocument 400 /error/error.php?code=400 ErrorDocument 401 /error/error.php?code=401 ErrorDocument 403 /error/error.php?code=403 但当我试图访问我的禁用子域index.php时,我得到了以下结果:

因此,我刚刚在httpd.conf中为自定义错误页面设置了新的错误处理程序:

Alias "/error" "/var/www/error/"
    ErrorDocument 400 /error/error.php?code=400
    ErrorDocument 401 /error/error.php?code=401
    ErrorDocument 403 /error/error.php?code=403
但当我试图访问我的禁用子域index.php时,我得到了以下结果:

您没有访问/访问此服务器的权限

此外,在尝试查找时遇到404 Not Found错误 使用ErrorDocument来处理请求


但是如果我尝试subdomain/jskldfjkd和subdomain/forbiddendic/也会给出正确的错误页面。在错误日志Apache sais中搜索noindex.html。我该如何解决这个问题?

在welcome.conf中有以下内容:

<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>

我删除了它,现在它可以工作了:

在welcome.conf中站着以下内容:

<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>

我删除了它,现在它可以工作了:

无论何时出于任何原因在索引页上执行禁止的操作,它都会触发此操作-例如,使用[F]标记进行mod_重写无论何时出于任何原因在索引页上执行禁止的操作,都会触发此操作-例如使用[F]标记进行mod_重写