Fix redirection for non-root installations, fixes #51
Fix redirection for installations with custom root path, refs #58
Merge pull request #65 from digitalnatives/v2_maintenance

Cherry pick fixes for #51 and #58 (closes #64)