replacing basePath on request