Revert commit 798e4aa which inadvertantly broke link rewriting in wordpress plugin