Backport redirects following logic
Merge pull request #101 from tarcieri/fix/redirects-in-0-5

Backport redirects following logic