The Rambam, of blessed memory, wrote [ibid.]: If witnesses came regarding her that she was secluded with this man, and they came and found an ugly matter, such as if they entered after him and found her girding a belt, or they found spittle above the canopy and the like, if her husband divorced her for such an ugly matter—behold, she may not marry the suspected man, but rather is forbidden to him. And if he transgressed and married her and she had children from him—she shall not leave, but if she did not have children from him—she shall leave. In what case does this apply? When the city gossiped about her and about the suspected man for a day and a half or more, and they said "so-and-so committed adultery with so-and-so" and the rumor did not cease, provided that she or he did not have enemies who spread the rumor. But if there was no gossip regarding this matter in the city, or if the rumor ceased not out of fear, if she married the suspected man—she shall not leave even if she does not have children; even if one witness came that she committed adultery with him—she shall not leave. Thus far his words. And according to his system, with witnesses of an ugly matter and a rumor that does not cease—we remove her from the suspect when they have no children, but when they have children—she shall not leave. And from the husband we do not remove her at all except with witnesses of defilement, for then even if she has several children she shall leave. And one should not wonder—how is it possible that the husband does not remove her and the suspected man removes her, for are not the husband and the adulterer equal, as in every place she is forbidden to the husband she is forbidden to the adulterer as has been written? However, this is regarding certain intercourse that the Torah decreed that in every place she is forbidden, she is forbidden to both of them, but in a case of doubt we are stringent regarding the suspected man and not regarding the husband [Beit Shmuel], and only the husband has the power to divorce her against her will even in this time in such a case, but we do not compel him and we do not offer him advice to keep her. And the Rambam wrote in chapter 24 of Ishut that she does not require a warning, for since there are witnesses of an ugly matter and a rumor that does not cease—she shall leave without a ketubah, and more than this is implied there explicitly, that this does not require a rumor that does not cease, but rather with witnesses of an ugly matter alone—she shall leave without a ketubah, see there. And there are many types of ugly matters: that when she was secluded with him and they stayed for a duration of defilement and witnesses saw the ugly matter, such as that she is standing above the bed and putting on trousers or girding a belt, or that they found moist spittle above the bed which is recognizable that at the time of the transgression she spat above the bed, and even though it is possible to attribute that this was when she cohabited with her husband, nevertheless since it is moist it appears that it was at the time she was with the suspected man [see Beit Shmuel subsection 5 and it requires further study]. And likewise if they saw the place of the shoes reversed near the bed which is recognizable that they removed their shoes and lay together in the bed, or that they were exiting from a dark place, or that they were bringing one another up from a pit which is recognizable that they were there and cohabited and the like, or that they saw him kissing her on her garment, or they saw them kissing one another, or they entered one after the other and closed the doors with a lock, and similar to these matters according to the perception of the beit din [and this is the opinion of the Rif and the Rambam and Rabbeinu Tam and the Behag and the Rashba and the Ittur].
כתב הרמב"ם ז"ל [שם]: אם באו עליה עדים שנסתרה עם איש זה, ובאו ומצאו דבר מכוער כגון שנכנסו אחריו ומצאוה חוגרת חגורה או מצאו רוק למעלה מן הכילה וכיוצא בזה, אם הוציאה בעלה בדבר מכוער כזה – ה"ז לא תנשא לנטען אלא אסורה עליו. ואם עבר ונשאה והיו לה בנים ממנו – לא תצא, ואם לא היו לה בנים ממנו – תצא. בד"א? כשרננו העיר עליה ועל הנטען יום ומחצה או יותר ואמרו פלוני זינה עם פלונית ולא פסק הקול, והוא שלא היו לה או לו אויבים שמעבירים את הקול. אבל אם לא היתה שם רננה לדבר זה בעיר או שפסק הקול שלא מחמת יראה, אם נשאת לנטען – לא תצא אע"פ שאין לה בנים, אפילו בא עד אחד שזינתה עמו – לא תצא, עכ"ל. ולפי שיטתו בעידי כיעור וקלא דלא פסק – מוציאין אותה מהחשוד כשאין להם בנים, אבל כשיש להם בנים – לא תצא. ומהבעל לא מפקינן כלל אלא בעידי טומאה, דאז אפילו יש לה כמה בנים תצא. ואין לתמוה – היכי אפשר דבעל אינו מוציא והנחשד מוציא, הלא הבעל והבועל שוים דכל מקום שאסורה לבעל אסורה לבועל כמ"ש? אמנם זהו בביאה ודאית גזרה התורה דכל מקום שאסורה אסורה לשניהם, אבל בספיקא מחמירים בהנחשד ולא בהבעל [ב"ש], ורק הבעל ביכולתו להוציאה בע"כ גם בזמה"ז בכה"ג, אבל אין כופין אותו ואין משיאין לו עצה להחזיקה. וכתב הרמב"ם בפכ"ד מאישות דאינה צריכה התראה, דכיון שיש עידי כיעור וקלא דלא פסיק – תצא בלא כתובה, ויותר מזה משמע שם להדיא דלא בעי בזה קלא דלא פסיק, אלא בעידי כיעור בלבד – תצא בלא כתובה, ע"ש. והרבה מיני כיעור יש: שכשנתייחדה עמו ושהו כדי טומאה וראו עדים הדבר המכוער, כגון שעומדת מעל המטה ולובשת המכנסים או חוגרת חגירה, או שמצאו רוק לח למעלה מהמטה שניכר שבעת העבירה רקקה למעלה מהמטה, ואף שיש לתלות שזה היה כששמשה עם בעלה, מ"מ כיון דלח הוא נראה שהיה בעת שהיתה עם הנחשד [ע' ב"ש סק"ה וצ"ע]. וכן אם ראו מקום המנעלים הפוכים אצל המטה שניכר שחלצו מנעליהם ושכבו יחד בהמטה, או שהיו יוצאים ממקום אפל, או שהיו מעלים זא"ז מן הבור שניכר שהיו שם ושימשו וכיוצא בזה, או שראוהו מנשק ע"פ חלוקה, או שראום מנשקים זא"ז, או שנכנסו זה אחר זה והגיפו הדלתות במנעול, וכיוצא בדברים אלו לפי ראות עיני הב"ד [וזהו דעת הרי"ף והרמב"ם ור"ת ובה"ג והרשב"א והעיטור].