Generating clean URL's for paginated content on Drupal sites

Topics: 

One of my clients wants his paginated content to have clean URL's. That is, Drupal sites frequently generate sequences of pages with "?page=##" query parameters to select each page. But he doesn't want this as a query parameter, but instead in the URL. The idea we're working on is to decrease the chance of duplicate content on the site as recorded by Google in the Webmaster Tools.

Unfortunately there really isn't a way to do this. Except for the Clean Pagination module https://drupal.org/project/cleanpager

I've installed it and found that it doesn't do the precise thing that is needed.

Installation is straight-forward. Download, and install. It gives you a configuration screen under the Configuration menu named Clean Pagination Settings.

Next, you give it a series of URL's for which to change the representation of pagination in the URL.

This is the first deficiency of this module. You have to specify each URL individually. But in our case we want to change the representation of pagination in URL's that take taxonomy terms. Actually, we want to do this for taxonomy pages, but that's the second deficiency which I'll mention in a minute.

For the sake of experimentation I created a View that acts somewhat like the taxonomy pages. It takes an exposed context filter so you specify a Term ID in the URL. The generated page shows teasers, just like you'd see on a taxonomy page. This means the URL for the View is "/post/##" and by default the pages get the URL "/post/##?page=##".

The problem is that telling the module to do clean pagination for "/post" doesn't work. You have to specify a "/post/##" for every taxonomy term.

Once you tell it, say, /post/98, the module changes the URL from /post/98?page=## to /post/98/page/##

That's nice enough, but you do have to tell it a /post/## for every taxonomy term.

In other words, the module works best for circumstances where there's a fairly short list of URL's for which to change the pagination as already discussed.

The other problem I found with this module is that it simply doesn't work for taxonomy pages. Which is why I had to create that View.