The prince of Yahweh's host said to Joshua, Put off your shoe from off your foot; for the place whereon you stand is holy. Joshua did so.
The command to remove his sandals (Joshua 5:15) would have convinced Joshua that this was the same God who appeared to Moses at the burning bush (Exodus 3:5).