Fix routing bug. Correctly handle custom url aliases in cleaning up the rewritten url