Replace old permalink with redirect middleware