remove trailing slash from URLs and rename base path