Strip port number properly from URL