I know of many people who keep rabbits and guinea pigs in the same cage. If done properly, this can be okay, though it is not recommended.
Why is it not recommended? Well, it is hard to feed the proper feed to each animal when they are in the same cage. Also, most rabbits are housed in all wire cages with wire cage floors, which are bad for a guinea pig's feet. Guinea pigs should be housed on solid flooring with absorbent bedding. Finally, many guinea pigs will chew on and pull out the fur on a rabbit.
If you still wish to house them together, it must be done correctly. Both need to be housed on solid flooring with absorbent bedding such as pine chips (avoid cedar) or pelleted cat litter. Provide regular guinea pig food, as it is similar to rabbit feed but contains vitamin C, which a guinea pig must have to avoid getting scurvy. Vitamin C will not harm the rabbit, but the lack of it could kill the guinea pig. Provide small amounts of treats with a lot of vitamin C such as well-washed carrots or oranges (especially the peels, if homegrown, to avoid pesticides and such). Also provide quality timothy or grass hay (not alfalfa as it is already in the feed and too much alfalfa can be bad). This will help prevent the guinea pig from chewing on the rabbit as well as help keep its digestive tract clear if it does ingest hair. Finally, provide toys and tunnels as well as plenty of attention to keep both the rabbit and the guinea pig occupied and stimulated to help prevent chewing.