Hi,
We've successfully completed our migration of 120,000 images (it took a while lol) and for the most part it's working very well.
We do have some instances where we have some broken images that we have linked to in articles. This was expected as those are actually no longer there
However, whilst doing this, I wondered if the following was possible.
eg on this page
http://www.spoilertv.com/2015/03/chicago-pd-episode-218-get-back-to-even.html
You will see some broken image links.
Each of these img src values look like this
Now that is fine and as I said expected.
Would it be possible somehow, I suspect through htaccess, that when it comes across a broken link that it instead displays a standard image. (Our image will say something like "The Thumbnail is currently missing, however clicking on me will load the correct page")
eg something like what tinypic do ( Screenshot http://tinypic.com/images/404.gif )
I'm not sure if there is a simple htaccess rule that could be written.
Any help, much appreciated.
I think I've got it fixed for broken images
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule .(gif|jpe?g|png|bmp) missing.png [NC,L]
You can see it working here
http://www.spoilertv.com/2015/03/chicago-pd-episode-218-get-back-to-even.html
However it seems that the other broken ones are not being detected as images but a php?
Not sure if there is anything that can be done.
http://www.spoilertv.co.uk/images/zp-core/i.php?a=Chicago%20PD/Season%202/Promotional%20Episode%20Photos/Episode%202.18%20-%20Get%20Back%20to%20Even&i=NUP_167772_0075.JPG&s=100&c=1&cw=100&ch=100&q=100&t=1&wmk=!
This is the link to the image processor so technically a php page until the image is cached which of course does not happen if it is not there anymore.
Not sure that is possible with htaccess as that of course cannot know about zp internal image processing.
Ah I see thanks.
Why does my link here
Not return an image but rather an error ?
See Screenshot
http://i.imgur.com/8EEd8NX.png
Yes, that actual link is one for the old server.
It will redirect here
Here is the redirected link that does not throw the default image.
The current versions of zenphoto use the strings {*WEBPATH*} and {*FULLWEBPATH*} as tokens to represent your sites basu URL. The FULLWEBPATH token includes the http(s)//, the WEBPATH one does not.
So if you have links in your database that are the wrong site you can find them and replace the site part with the appropriate token. You would do this with your MySQL GUI--see your hoster for how to access it. Simple SQL statements can make the replacements. You just need to know what tables and columns to examin. In your case that is most likely the news table and the content column.
Once those tokens are in place zenphoto will replace them with the correct site link before they are placed on any content pages.