control and safety for the rider is a whole different issue, but from the medical point of view, you should keep your mare in condition (ride her) until the moment that she gives birth. when she's one month before due, going on walks is the only real thing you can do with her, but it will help the foal turn into it's correct position and will keep the mare fit.
a big problem with mares that are being ridden trhoughout the year, is that they will loose out in condition very fast if you just stop training them one month before giving birth. so going on long walks until the day she foals is the best thing you can do for your mare.
after the foal is born, you can ride her as soon as three days after, but it depends on the mare, her condition and how she reacts to your presence. in the first month afetr foaling i never take a mare to competitions, and i train them with the foal present, running loose. but after one month they come out in competition again. BUT you have to know their reactions.
[email protected]