better redirect patch, less picky if the port number is there or not