Sunan Ibn Majah, Book 6, Hadith 28 (Ibn Majah 1460)

It was narrated that ‘Ali said:

“The Prophet (ﷺ) said to me: ‘Do not show your thigh, and do not look at the thigh of anyone, living or dead.’”