Monthly Archives: June 2014

Only recent ‘Other stories …’

Following a reader’s request, we reduced how ‘old’ the articles show in the ‘Other stories …’ section under each article.

Previously we went pretty deep – at four year I think. We’ve now reduced this to two months to increase relevance.

We should perhaps be thinking of a way to make readers aware of this, to increase re-use. Display the date of the articles?

Dropping /YYYY/MM/DD from WordPress URL and successfully redirecting

I wanted to drop the Year / Month / Date part of the URL from the Cafe Scientifique site, so what would previously have been
http://cafescientifique.onthewight.com/2014/06/11/barry-arnold-story-chocolate-science-serendipity/
becomes

Barry Arnold: The story of Chocolate: Science and Serendipity

We just didn’t need to know in the URL what the date of the posting was.

Not wanting to lose any URLs that might have been referenced elsewhere, a Redirect Rule was needed.

RegExp code for Redirect Rule
John P. Gamboa and James Gardner at WPE were heroes forming the RegExp needed to do they job. We ended up with

Source: ^/(\d*)/(\d*)/(\d*)/(.*)/?$
Destination: /$4
Domain Wildcards: cafescientifique.onthewight.com

As James pointed out, it was the fourth string that we needed to be used.

Permalink Setting has to be changes from ‘Day and Name’ to ‘Post name’ as well (of course!).

It working
So now
http://cafescientifique.onthewight.com/2014/06/11/barry-arnold-story-chocolate-science-serendipity/
resolves to
http://cafescientifique.onthewight.com/barry-arnold-story-chocolate-science-serendipity/
and none of the other subdomains are affected. Perfect.