Replace port in host if it exists