"And Joshua adjured them at that time, saying: Cursed be the man before the LORD" (Joshua 6:26). It was taught: in [the word] "cursed" there is excommunication, there is cursing, there is an oath. In it there is excommunication, as it is written, "Curse Meroz" (Judges 5:23); and Ulla said, with four hundred shofar blasts did Barak place Meroz under the ban. In it there is cursing, as it is written, "And these shall stand upon the curse" (Deuteronomy 27:13), and it is written, "Cursed be the man who makes a graven image" (Deuteronomy 27:15). In it there is an oath, as it is written, "And Joshua adjured them at that time," and it is written, "And the men of Israel were distressed that day, for Saul had laid an oath upon the people" (1 Samuel 14:24). "Who rises up and builds this city, namely Jericho" (Joshua 6:26). From the implication of what is said, "this city," do I not know that it is Jericho? What does Scripture come to teach by saying "namely Jericho"? That Jericho should not be built under the name of another city, and that another city should not be built under the name of Jericho.
The Threefold Force of Joshua's Oath Over Jericho
Yalkut Shimoni on Nach 16:1
וישבע יהושע בעת ההיא לאמר ארור האיש לפני ה' (יהושע ו, כו). תאנא ארור בו נדוי בו קללה בו שבועה. בו נדוי דכתיב אורו מרוז, ואמר עולא בארבע מאה שיפורי שמתיה ברק למרוז. בו קללה דכתיב ואלה יעמדו על הקללה, וכתיב ארור האיש אשר יעשה פסל. בו שבועה דכתיב וישבע יהושע בעת ההיא וגו' וכתיב ואיש ישראל נגשש ביום ההוא ויואל שבול את העם וגו'. אשר יקום ויבנה את העיר הזאת את יריחו. ממשמע שנאמר את העיר הזאת איני יודע שהיא יריחו מה תלמוד לומר את יריחו, לא יריחו על שם עיר אחרת ולא עיר אחרת על שם יריחו: