replace localhost by relative path