To understand and appreciate how Rahab's house survived the event in Joshua 6,
first it should be recognised that the wall's fate to "fall down flat" was a miracle. And second, to grasp the wall's fate within the context of the narrative, it is necessary to understand the Hebrew word "tachath" in Joshua, which is given in English as "flat".
In Strong's Concordance, "tachath"  conveys the idea of collapse "in [same] place" and supports the Targum's rendering in Joshua 6:5 "...and it shall be swallowed up under it..." Thus the wall sunk, to God's desired depth, in order to leave enough of the wall visible as a memorial of the miracle.
The memorial is supported by four environmental circumstances:
the wall's falling down flat did not damage the houses, even the houses in, on top, and against the wall.
the wall's falling down flat did not cause rocks and debris to roll down the hill into the Israelites.
the wall's falling down flat did not form a choking, blinding cloud of dust.
the wall's falling down flat did not hinder the Israelites from immediately running up the hill into the city and going through the streets and houses during their first herem [aggressive behavior that displayed their obedience to God's command to claim the promise land].
It was the first environmental circumstance that enabled Rahab's house to survive the wall's falling down flat.
[Stanley Johnson, School Superintendent, Christ Baptist Church, Pastor Arthur D. Taylor, 1509 Church Lane, Philadelphia, Pa 19141 [firstname.lastname@example.org]