Written by James McDonald

September 25, 2015

If you have moved from one content management system to another. For example you move from Drupal to Joomla and you have a social media plug-in that posts your articles to your Google+ or Facebook page you might find when you move CMS’s that your social media feed is missing the images.

For google + this is because G+ use a proxy server to request the images from your website when someone views your feed.

So when you move from one CMS to another you tend to break the path to your images.

E.g. drupal plonks images in /sites/default/files and Joomla put them in /images/modulename/perhapsyearame/

So how to fix?

What I do is look in the access.log of apache and then grep out the things that are being requested and returning 404s

e.g. the following gets you all that is being requested but not found by you server

cat /var/log/apache2/other_vhosts_access.log | grep -e '\s404\s' > 404s.log
# also look for (via ggpht.com GoogleImageProxy) in the logs this will tell you that 
# it's a G+ server requesting a missing image

once you have a list of 404s you can then look through and find requests for images and then map them to the new content.

Once you know an old and then a new url you can write Redirect rules to suit.

# put in .htaccess
Redirect 301 /sites/default/files/fallacious_rumours.png /images/blog/2015/fallacious-rumours.png

You can then refresh you G+ feed and watch the missing images re-appear.


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Clear HSTS Settings in CHrome

Open chrome://net-internals/#hsts enter the domain in the query field and click Query to confirm it has HSTS settings...

Ubuntu on Hyper-v

It boils town to installing linux-azure # as root or sudo apt-get update apt-get install linux-azure...