In a pure client based web app I need to show a background image that sometimes doesn't exist. Is there a way of 'forcing' Apache to serve an image when a specific URL pattern returns a 404 error?
The URL pattern that might return a 404 is:
http://host/assets/user-images/xxxxx.jpg
Where I want to serve the image:
http://host/assets/user-images/default.jpg
NOTE:
I already use a .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]