fix when not save rpath in cookie,first visit will cause a url of "?rpath=null" issue