Fix absolute URI when there is a port