fixed: when redirecting, lose url port.
优化写法，反正port为空，或为https下的443
Merge pull request #8 from minowu/minowu/redirect_port

fixed: when redirecting, lose url port.