I can't get pagination to work properly when using 'pretty' permalink settings.
Let's say I have a gallery that is split over 4 pages.
Page 1 shows fine. URL is
Page 2 will work, and will give the URL
Page 3 will work, but give the URL
[domain]/[page name]/nggallery/page/3?q=/[page name]/nggallery
Page 4 will result in a 404 error, because the URL its creating is
It doesn't actually matter what order I try the pages in, the permalinks just seem to get increasingly complicated, until the point where it doesn't work after the third page.
If I reset my permalink settings back to default, with ugly page names, it works just fine.
I've researched the problem as far as I can, and initially it seemed that a fix was simply to reset the permalink settings (save to default, and then save back to pretty permalinks) but this hasn't made any difference.
I've deactivated all other plugins, cleared the cache, and I still get the same problem. I thought initially that the permalink settings in the WordPress SEO plugin might have been conflicting, but the same problem exists when it is deactivated.
Everything is latest version - WP3.9.1, NextGen 2.0.65, and I'm running on a Linode VPS with nginx.
You can see an example of the issue at http://client1.themooringsbushey.co.uk/our-twin-club/
Any help or advice much appreciated