Just migrated a blog to Ghost. I migrated the /images/ directory of the old blog following the directions, as part of an import zip. But now the images are located at /content/images/ … which breaks all the images, of course. So I tried the following redirect:
…both with relative and absolute URLs for the “to” – but Ghost is adding a trailing slash at the end of the image file extension, which results in 404 errors.
I did figure out that a side-effect of this is that the regexp $1 capture included the trailing slash, even though the original request path did not have one. Now I just need to figure out a regexp that captures a path like /images/blog/podcast.gif/ such that the $1 capture includes slashes in the directories but excludes the final trailing slash. Need to polish up my regular expression skills for that one. In the meantime, I create a few separate rules that match exact image paths…