Allow HTTPS + HTTP links to be re-written correctly