set basepath to valid URL