The first phase of the work will begin at 8am on Saturday, 26 July and continue until Sunday 8pm on Sunday 2.
The second phase will be undertaken between 8am on Saturday, 2 August and Sunday, 3 August.
Mike Webster, Highways Agency Project sponsor said:
By undertaking the work during weekends when traffic flows are at their lowest we have been able to minimise disruption for road users but we would advise people to plan their journeys in advance.
The work will require a full closure on a four mile section of the A40 at the Huntley Bends.
The following fully signed diversion route will be in place throughout the works:
Through traffic will be advised to join the A417 north to junction 2 of the M50, then continue along the M50 to the A449 before rejoining the A40.
Local traffic is advised to use the A4136 Forest Gate to Church Road.
Members of the public should contact the Highways Agency Information Line on 0300 123 5000.
Journalists should contact the Highways Agency press office on 0844 693 1448 and use the menu to speak to the most appropriate press officer.