Gallery2 to Gallery3 – rewriting .jpg.html in URLs

I had a rough time trying to get my gallery2 install imported and moved to the gallery3 platform. The g2 import process stalled out a lot and crashed & burned hard when faced with different folder names for the redirects (/gallery became /photos). After a lot of fighting with the g2import module & htaccess, I disabled the g2import module and pursued a strictly .htacccess solution for redirecting visitors from the old gallery2 URL to the new gallery3 URL.

One issue I kept coming up against was that the gallery2 URLs all included the source file name and an HTML extension for its rewrite URLs, but gallery3 did away with this behavior. For example:

  • G2: /gallery/album/photo.jpg.html
  • G3: /photos/album/photo

After some help from some folks on stackexchange, I finally found a solution with the following .htaccess content on the old gallery2 URL:

Now to get back to trying new module and skin options in gallery3. I’ve been loving the lightroom gallery3 publish plugin and will write further on my experiences with it when I have a chance.