(fix) Fix URL modification and redirect behaviour.
Merge pull request #38 from michaelsproul/fix/redirection

Fix URL modification and redirect behaviour.