Added scheme to redirected path, urls generating properly based on flags