Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 404使用.htaccess重定向到403页时出错?_Html_.htaccess - Fatal编程技术网

Html 404使用.htaccess重定向到403页时出错?

Html 404使用.htaccess重定向到403页时出错?,html,.htaccess,Html,.htaccess,我收到一个404问题: Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 我的.htaccess看起来像这样。My.htaccess和index.html位于“bar”文件夹中: ErrorDocument 403 /public_html/foo/bar/errorpages/403.html order deny

我收到一个404问题:

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 
我的.htaccess看起来像这样。My.htaccess和index.html位于“bar”文件夹中:

 ErrorDocument 403 /public_html/foo/bar/errorpages/403.html

order deny,allow

deny from all

allow from 123.456

我的错误页面中也有.htaccess:

order deny,allow
allow from all
我重定向错了吗

更新

我还尝试将目录更改为

/bar/errorpages/403.html
但仍然存在相同的问题:(

尝试使用

order allow, deny
相反


查看示例。

抱歉,这没有任何作用。My.htaccess与My index.html位于同一文件夹中,这是否会导致冲突?不,可以将它们放在同一文件夹中。更改htaccess文件后是否重新启动Apache服务?我不确定是否有必要;我以前在更改http.conf后必须这样做。是的,但对于我来说,at似乎不是问题,您可能有其他解决方案吗?这已经困扰了我好几个小时了。您可以查看一下;看起来httpd.conf文件中有问题导致了问题。