The divine command preceding the conquest of Ai marks a turning point in how the Israelites wage war. It signals a shift from relying on open miracles to using natural military strategies, bringing with it a significant change in the rules of warfare.
God instructs that the fate of Ai and its king must be identical to that of Jericho. This means the city is destined for complete destruction, to be burned to the ground, with all its inhabitants falling by the sword [רד"ק, מלבי"ם, ביאור שטיינזלץ].
However, a major difference emerges regarding the property within the city. During the battle of Jericho, all spoils and livestock were strictly banned from personal use and dedicated entirely to God's treasury. The primary approach among commentators is that this ban is now lifted. The people are permitted to follow normal customs, taking the spoils and livestock for their own personal needs instead of consecrating them.
The reason for this change lies in the nature of the conquest itself. The fall of Jericho's walls was an absolute, visible miracle, and therefore the spoils were dedicated to God. In contrast, the capture of Ai will rely on natural military tactics, making the spoils permissible for the people to keep [מלבי"ם].
Because this battle requires careful military planning, God commands the use of an ambush. A military force must be positioned in hiding, completely out of sight from the people of the city [מצודת ציון, ביאור שטיינזלץ]. The chosen location for this hidden force is specifically behind the city, positioned on the opposite side from where the main army will make its advance [מצודת דוד].