Improving redir parsing