Php index.html作为错误页

Php index.html作为错误页,php,apache,errordocument,Php,Apache,Errordocument,我正在尝试使用index.html页面作为Apache中的ErrorDocument页面之一 与这家伙在这里所做的非常相似: 但不使用PHP(服务器运行时很热) 我到目前为止所做的尝试 不多。设置errordocument401index.html将Apache置于无限拒绝循环中 有没有办法解决这个问题(同样没有PHP) 编辑: 文档根目录下的My.htaccess文件: AuthUserFile /yep/this/path/exists/.htpasswd AuthGroupFile /d

我正在尝试使用index.html页面作为Apache中的ErrorDocument页面之一

与这家伙在这里所做的非常相似:

但不使用PHP(服务器运行时很热)

我到目前为止所做的尝试

不多。设置
errordocument401index.html
将Apache置于无限拒绝循环中

有没有办法解决这个问题(同样没有PHP)

编辑:

文档根目录下的My.htaccess文件:

AuthUserFile /yep/this/path/exists/.htpasswd
AuthGroupFile /dev/null
AuthName "Please Enter Password"
AuthType Basic
Require valid-user

#ErrorDocument 500 "The server made a boo boo."
ErrorDocument 401 /index.html
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html

您可能必须编辑.htacess文件。是否存在“无限拒绝循环”?看起来你做得对。检查index.html上的权限@曼卡丹卡是的,那是我编辑的地方。仍然没有爱。如果你提供所做的更改,社区会帮助你。@cantelope没有,权限似乎很好-注释401行并输入正确的凭据确实会产生预期的网页。