Handle port numbers in url concatenation