Is it possible to use htaccess to redirect all queries for non existent images to a default.jpg? What I want to do is use keyword rich image names in my code, but display my default.jpg instead. e.g my html says: <img src="purple-widgets-for-sale.jpg" /> But since that image doesn't really exist, it pulls in default.jpg instead. I hope this makes sense. And I hope it's possible somehow.
Try adding this to the .htaccess file of some directory and all the files behind that directory will be affected: <FilesMatch "\.(jpg|jpeg|png|gif|JPG|JPEG|GIF|PNG)"> ErrorDocument 404 path_to_your_default_jpg </FilesMatch> Value example for path_to_your_default_jpg: "/pic/default.jpg"