Can you replace a headliner in a car with just a regular piece of cloth?

You need to select a type of cloth that is not affected by heat and won't rot soon.