A major road will be closed for seven weeks starting later this month to improve facilities for pedestrians and cyclists.