Properly handle path redirections.