api ajax path changes based on baseUrl