When any public road or highway shall be closed, as hereinbefore provided, it shall be the duty of the authorities authorizing the closing to immediately designate or lay out a detour, on which they shall erect or cause to be erected and maintained, while such detour is in use, legible signs at each public road intersection throughout its entire length, indicating the direction to the main highway; and, during the period when such detour is in use, it shall be the duty of the authorities closing the main highway to maintain such detour in safe and passable condition. It shall also be the duty of the authorities closing the main highway and maintaining the detour to immediately remove all detour signs when the highway originally closed is opened for traffic; and said authorities shall, as soon as possible, repair the road designated as a detour, and place same in a condition at least equal to its condition when designated as a detour. Whenever necessary in the creation of a detour, as aforesaid, the authorities responsible for laying out the detour may enter into agreement with the owners of private lands, covering the acquisition of right-of-way privileges over private property for the period when the main highway shall be closed to traffic. In case no agreement satisfactory to the parties can be reached, the authorities responsible for the laying out of the detour may proceed with the construction of the same, and either such authorities or the owner of the property occupied may petition the court for the appointment of viewers to ascertain the damages, if any, in the same manner as damages are now ascertained for the opening of public roads. In the exercise of the rights conferred by this section, the authorities responsible are hereby empowered to pay for the necessary maintenance, subsequent repair, damages, and land rental, out of such funds as are available for the construction or maintenance of the highways in their charge.
36 P.S. § 2204