refactor redir_do into smaller methods
Merge pull request #2 from matugm/multi-host

refactor redir_do into smaller methods