Preserve URI protocol when redirecting