Rash is mostly due to fungal infection as that area remain moist most of the time and if it is due to bacterial infection it seems brown rather than red and does not have any scales or blister. So better consult doctor before applying any anti-fungal or steroid cream.
Once cured you can take preventive measures such as:
-Allow the area to dry completely after showering before wearing clothes.
-Wear loose fitting cotton cloth.
-Avoid sharing towels or washcloth.
-Use anti fungal powders or sprays once a day to prevent infection.