KOMPX.COM or COMPMISCELLANEA.COM   

404 Error page for missing files

Setting custom 404 Error page for missing files in .htaccess file:


<FilesMatch ".+\.(jpe?g|png|gif)$">
	ErrorDocument 404 /404-images.htm
</FilesMatch>

Commentary

Checking if missing files match ones with extensions jpg, jpeg, png and gif


<FilesMatch ".+\.(jpe?g|png|gif)$">

Then setting the custom 404 Error page for missing images to be 404-images.htm


ErrorDocument 404 /404-images.htm

Notes

  1. Apache Custom Error Responses: httpd.apache.org/docs/2.4/custom-error.html
  2. Apache <FilesMatch> Directive: httpd.apache.org/docs/2.4/mod/core.html#filesmatch
Web servers
More