(cleanup) Cleaned up redirect URL conversion.

Made use of changes from #199.