There are no rules on exercising while ill. Take each illness on a case by case basis. Riding is work so if you are feeling lousy you have to be confident that you can hack the planned ride. It is best to play it safe and stay at home if you think you might possibly faint, collapse, go into respiratory failure, etc. With mild upper respiratory infections, I ride lightly. With anything worse, I avoid trouble and take a rest.