add handling of empty path of URL