Hello, first post. I am loading a bunch of images from a remote company server which contains product images. The images are loaded by a serial number. Problem is that not all products have images. So the remote server automatically substitutes a blank.gif whenever the serial number provided fails. The site i am building, I want to substitute my own "No Product Image Available" image whenever the blank.gif is requested. How can i do this on the server level? I have a PHP script that does this pretty well but it slows down the page load time. I am hoping if I can simply get an rewrite rule to replace blank.gif with "my-own-image.jpg".
try this one. ========== RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$ RewriteRule .* path/to/my-own-image.jpg[L] ==========
good question... the image is being loaded from something like this: http://www.remote.com/directory/blank.gif
this is what happens: when I request image file: http://www.remote.com/directory/123456.jpeg (302 Found) the remote.com server realizes it's not available and sends back http://www.remote.com/directory/blank.gif (304 Not Modified)
This doesnt work, also I think this Condition is forcing all images to be substituted with one image.