The woman, the Jews of Israel, who live in Judea will flee to the mountains when the AoD is placed in the temple. They will know to do so because the two witnesses will be preaching to them in Jerusalem for several years aforehand, testifying about Jesus, and that the Antichrist is not the rightful King of Israel messiah they will be thinking him to be.
Once in the mountains of Israel, the Jews who have fled there will be divinely protected by God.
After the two witnesses are killed by the beast on day 1260 of their testimony, and after the 3 1/2 days of their bodies laying dead in the streets of Jerusalem, the 7th trumpet sounds, and there is the war in the (second) heaven in Revelation 12:7-9.
After Satan and his angels are cast down to earth, he has great wrath and will seek to persecute the remainder of Jews in Jerusalem, who will still be trying to flee. Some will continue to make it into the wilderness, but it will be harder and harder. Some supernatural acts by God will help their fleeing (the earth opening it mouth, to swallow the river from the mouth of the dragon, figuratively speaking).
Them in Revelation 12:17 are the Jews who will be trapped in Jerusalem, and the ones in Zechariah 14, that Jesus rescues by splitting the Mt. of Olives in half.
17 And the dragon was wroth with the woman, and went to make war with the remnant of her seed, which keep the commandments of God, and have the testimony of Jesus Christ.