redirect legacy permalinks to new format