Preserve scheme when redirecting to blob \ cdn

Fixes bug #576