will try to redirecto to the same url on https if it can. Takes into account port numbers too. :)