Make sure your baby's clothing is a light, natural fabric like cotton and fits loosely, particularly around the problem area. Dusting his legs with cornstarch can also help.
Maybe you should consider changing the diaper brand that you're using. Some diapers might irritate baby's sensitive skin. Try using some anti-rash cream or lotion that is hypo-allergenic.
I would make sure to put lotion on baby's legs and then try to keep baby in some kind of thin, cotton pants or leggings most of time so baby's skin can still breath, but it is not skin-to-skin contact all the time.
When it's hot out make sure you keep your baby cool. Let him have some time where he doesn't have a diaper on each day. This will let his rash area dry out. Make sure he's dry before putting a diaper on him.
The best way to prevent heat rash is to have the child wear clothing that covers the upper thigh area. The next best way I have found is to rub a small amount of plain Vasoline to the area in order to prevent friction.