Confinement to the home was the punishment ordained for Zinaa in the early part of Islaam based on the following Verse of the Qur'aan.
Those who commit unlawful sexual intercourse of your women – bring against them four [witnesses] from among you. And if they testify, confine the guilty women to houses until death takes them or Allah ordains for them [another] way.
Then, an Ijmaa occurred that confinement was abrogated.
Dishonoring those who indulged in Zinaa
They scholars differed if dishonoring (the ones who indulged in Zinaa) was abrogated or not. A group of scholars said it was abrogated. Mujaahid was one of those who held this opinion. He said the following:
And the two who commit it among you, dishonor them both
[Qur’aan 4: Portion of Verse 16]
has been abrogated by the Verse in Surah al-Nuur.
Another group held the view that dishonoring the ones who indulged in Zinaa has not been abrogated. Rather, it is to upheld side by side with lashing as the two do not contradict one another in any way. The one who indulges in Zinaa can be lashed as well as dishonored.
It is waajib, according to this group, that the two who indulged in Zinaa be dishonored. People should say to them you committed an evil and vile act and both of you opposed the Command of Allaah.
Kuwaiti Encyclopedia of Fiqh
Volume 24 Page 21