Forum Moderators: phranque
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^image/[^/]+/[^_]+_([0-9]+x[0-9]+)\.jpg$ http://example.com/images/unknown_$1.jpg [R=301,L]
The RewriteCond %{REQUEST_FILENAME} !-f is true for all images. I would like the code to find all images that are not found. By placing the above code it thinks that all images are not files even though they exist. Can someone help?
I was recommended to use
<Directory "/your-site-path/images">
ErrorDocument 404 /images/not-here.jpg
</Directory>
However, I have images of different sizes. So I would like to map abc_74x74.jpg if not found to unknown_74x74.jpg and etc for the other sizes.
Thanks