Tourists are not required to follow any particular dress code to visit the pyramids in Egypt. Although many online sources say that female travellers should not wear short pants, many female tourists do, and nobody bats an eyelid. Both men and women are free to wear shorts to visit the pyramids.