fix javacript base url error when root dir is /