Valmiki Ramayana Ayodhya Kanda Sarga 117 Shloka 22
Original Shlokaनगरस्थो वनस्थो वा पापो वा यदि वा शुभः। यासां स्त्रीणां प्रियो भर्ता तासां लोका महोदयाः।।2.117.22।।
1 source checked for this shloka
यासाम् those, स्त्रीणाम् women, नगरस्थः in the city, वनस्थो वा or in the forest, पापो वा or sinful, यदि वा or, शुभः virtuous, भर्ता husband, प्रियः dear, तासाम् for them, महोदयाः highly promising, लोकः worlds.
One who is devoted to her husband, whether he be in the city or in the forest, whether he is sinful or virtuous, will attain the most prosperous worlds.