From and after the passage of this act, except in the case of emergencies wherein the safety of the public would be endangered no public road or highway in this Commonwealth shall be closed to vehicular traffic, except upon order of the authorities having charge of the maintenance of such highways, nor for a longer period than is necessary for the purpose for which such order is issued: Provided, however, That no public road or highway shall be closed to vehicular traffic when the same has been designated as a detour by the Department of Highways of the Commonwealth, unless the written consent of the Department of Highways has first been obtained, or unless the authorities having jurisdiction over said road or highway shall, by resolution duly recorded on their minutes, declare such closing necessary for the protection of the public safety.
36 P.S. § 2202