I love the taste of onions and garlic and it seems lots of other people do too. But they upset my stomach so much that I can't really cook with them. What can I use in their place to give my food a similar flavour?
Many South Asian recipes use a (fairly weird) spice called "hing" or asafoetida powder. It's got a vaguely similar aroma.
Generally you add a pinch to hot oil before beginning a dish. A half-teaspoon is usually enough for a four- to six-serving preparation.
You can find it quite easily at South Asian grocery stores and online.
Oh, and it's "weird" because of the way it's gathered. Unlike other spices, it's not from a seed or seed pod or bark — it's sap, dried and ground. (Most hing powders are packaged with some filler.)
Some herbs, daikon, or asafoetida powder which is an Indian spice often time used as an onion substitute. You can find it here: http://www.thespicehouse.com/spices/asafoetida-powder
Asafoetida may also be used as a substitute for garlic. Garlic chives may also work but are still fairly oniony/garlicy.
I'd browse around this site a bit. They have quite a few great substitutions for various ingredients: http://www.foodsubs.com
If the recipe calls for onion and garlic, then shallots would be a great substitute, especially if you trying to make the food less "heavy."
Shallots are related to onions but much milder than onions, and also have a taste that's similar to garlic (I believe it's due to the amount of phenols, but don't quote me on that).
People ask very often what they can substitute for shallots, and the best answer I've found is onions and garlic in a 2:1 ratio - but it's not quite the same, the result ends up being a lot stronger than a shallot.
In fact, I believe that many recipes calling for garlic and onion actually should be calling for shallots, but that the writers of these recipes assume that the readers won't have them (or in some cases even know where to get them). And that's a shame, because too much onion and garlic can do a lot of damage to a delicate recipe.
I cannot promise that this will "sit" better with you - that really depends on your digestive system and how exactly you react to onions - but in most cases shallots tend to be milder on the stomach for the same reason that they're milder on the taste buds. So give it's worth trying something that may actually enhance the flavour of your dish as opposed to making it blander!
If you want to try something less orthodox, I'd use wild garlic, collected in spring in the forests. When collecting, be careful not to confound it with "may lily" which is a toxic plant.
You can make a great pesto of it too.
If you are making garlic bread and need a sub, asofoeteda (hing) and some nutritional yeast a is a good option.
In Indian cooking, hing with ginger can be added for flavor replacement of onion and garlic.
Diakon, finely cut, with a pinch of hing is a good replacement for raw onions in chevdas, etc
Onions, garlic and others from the Alium family are prohibited in Hindu cooking because they have a Thamasik effect on a person. Tamasik propensity like laziness, lack of interest in higher taste, over eating, over sleeping, etc.
Dehydrated onion powder. It works well in soups and stews, but obviously won't be a good substitute for a pile of sautéed onions on top of your steak.
Also, in May an June, you might be able to find Ramps (Wild Leeks, Wild Garlic, Mountain Garlic) - Allium tricoccum, which has a lovely subtle flavour and is a bit easier on the stomach.
green onions or chives can be a substitute for onion if you can handle those.
Garlic is tough to replace, but it depends on the recipe. Some recipes like salad dressings, you can get buy by omitting it or just replacing it by something on the bitterish side like pickles or picked beats.
if you're substituing it in cooking, then perhaps a high quality onion and garlic powder (not salt) would suffice. NOTE that this advice should only be used by people who can't eat onion/garlic and not by lazy folks who don't want to peal and cut
Scallions work really well as a replacement onions and garlic, yes they flavor will be milder but scallions have flavor components of both in my humble opinion. Green onions/spring onions add a nice onionly flavor and chives are also good sprinkled on top of burgers, and even steak for a nice, yet mild onion flavor.