Sotah2: 6
הַכֹּל שָׁוִין שֶׁאֵינוֹ מַתְנֶה עִמָּהּ לֹא עַל קֹדֶם שֶׁתִּתְאָרֵס וְלֹא עַל מֵאַחַר שֶׁתִּתְגָּרֵשׁ. נִסְתְּרָה לְאַחֵר וְנִטְמֵאת, וְאַחַר כָּךְ הֶחֱזִירָהּ — לֹא הָיָה מַתְנֶה עִמָּהּ. זֶה הַכְּלָל: כֹּל שֶׁתִּבָּעֵל וְלֹא הָיְתָה אֲסוּרָה לוֹ — לֹא הָיָה מַתְנֶה עִמָּהּ.
All agree that he cannot stipulate with her concerning [the time] before she was betrothed or [the time] after she will have been divorced. If she secluded herself after [she had been divorced] and became defiled, and he then remarried her, he could not stipulate with her concerning this. This is the rule: Any [incident in] which even if she had cohabited she would not be prohibited to him, he cannot stipulate with her [concerning it].