• The gallery on my site has urls that look like this:
    /gallery/nggallery/[album-title]/[gallery-title]/
    and I’d like them to look like this:
    /gallery/[gallery-title]/

    I tried writing a RewriteRule in .htaccess, like this:
    RewriteRule ^/gallery/nggallery/services-gallery/(.+)$ /gallery/$1 [L]
    but that didn’t work.

    Any thoughts on how I can shorten the urls of my gallery?

    http://wordpress.org/extend/plugins/nextgen-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jazzerus

    (@jazzerus)

    I’m halfway there with a little help from the Redirection plugin. I created a pass-through rule with:
    source: /gallery/(?!nggallery)/?
    target: /gallery/nggallery/services-gallery/$1

    Now I just need to get the gallery to output the rewritten urls.

    Thread Starter jazzerus

    (@jazzerus)

    The plugin tag is [album id=2 template=extend] so I just had to edit the album-extend.php template.

    Where it outputs $gallery->pagelink, I modified it as: str_replace("nggallery/services-gallery/","",$gallery->pagelink)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: NextGEN Gallery] rewriting gallery urls’ is closed to new replies.