Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.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
Apache 404不存在图像的图像[htaccess]_Apache_.htaccess - Fatal编程技术网

Apache 404不存在图像的图像[htaccess]

Apache 404不存在图像的图像[htaccess],apache,.htaccess,Apache,.htaccess,如果请求的图像不存在,我将尝试显示404图像。这一次我成功了 <FilesMatch "\.(jpg|jpeg|png|gif)$"> ErrorDocument 404 "/no.png" </FilesMatch> 错误文档404“/no.png” 但是,如果用户试图显示带有目录的图像(例如:example.org/img/nonexistingimage.png),则会失败。我的问题是如何将它与目录一起使用?在我的服务器上工作正常。你是怎么失败的?在我的服务器

如果请求的图像不存在,我将尝试显示404图像。这一次我成功了

<FilesMatch "\.(jpg|jpeg|png|gif)$">
ErrorDocument 404 "/no.png"
</FilesMatch>

错误文档404“/no.png”

但是,如果用户试图显示带有目录的图像(例如:example.org/img/nonexistingimage.png),则会失败。我的问题是如何将它与目录一起使用?

在我的服务器上工作正常。你是怎么失败的?在我的服务器上工作很好。你怎么会失败的?