bugfix : ensure skipping '/' when checking and removing the basepath from the url