cannot use a full URL in a 401 ErrorDocument directive

注意到在 DBA Wiki 的 Apache Error Log 里面有这样一条信息频繁出现:

http:[Thu Feb 12 22:16:11 2006] [notice] cannot use a full URL in a 401
ErrorDocument directive ---ignoring

在 bin 目录下的 .htaccess 我定义了 401 错误的重定向.检查了一下.原来 Apache 下不能用 URL 路径.必须要本地路径才可以.修改为如下:

# File to return on access control error (e.g. wrong password)
# By convention this is the TWikiRegistration page, that allows users
# to register with the TWiki. Apache requires this to be a *local* path.
ErrorDocument 401 /bin/view/TWiki/TWikiRegistration

修改之后该错误不再出现.记录一下.或许对别人也有用.


One thought on “cannot use a full URL in a 401 ErrorDocument directive

Leave a Reply

Your email address will not be published. Required fields are marked *