Ride early whenever possible. Take two bottles of water in insulated bottles with ice. Fill one with an electrolyte mix to replenish what you lose in sweat. The plain water you can drink and pour over your head and back to cool you down. Use different bottles, mark them or keep them in a special position so you don't forget and pour the mix over your head.
Plan your route with stops for more ice and water. With a little planning you can make it more comfortable and safer to ride when it heats up.
Drink regularly and often. When it's really warm, plan to drink one bottle and pour the other over yourself. Breaks in the shade help you recover and cool down. Listen to your body and don't push too hard! Heat exhaustion can easily catch you unaware.
Here is an interesting article on the physiology of exercise and sweat: