change relative path according to the url