https://www.cdc.gov/ecoli/ecoli-prevention.html
E. coli infections are most commonly associated with UTIs (urinary tract infections), but it can also cause enteric infection, invasive infection, and infection at other sites. UTIs are usually ascending infections, travelling from the perineum up through the urethra. Along with UTIs, E. coli can also cause prostatitis and pelvic inflammatory disease (PID). While E. coli inhabits the gastrointestinal tract normally, some strains of the bacteria have acquired genes that allows it to infect the intestinal tract. If these strains of E. coli are ingested, they can cause diarrhea. If the normal anatomic barriers of the intestinal tract are disrupted by disease or trauma, some other strains of E. coli are capable of causing extraintestinal infection. Most E. coli infections can be treated with a simple course of antibiotics, however, some infections require surgery. Antibiotic resistance is becoming more common with E. coli, starting with ampicillin and tetracycline, while resistance to trimethoprim/sulfamethoxazole has had an uptick in recent years. Some strains are even multidrug-resistant, producing extended-spectrum beta-lactamases (ESBLs) and are the main cause of community acquired UTIs and sepsis.
Many E. coli infections that occur outside of the digestive tract happen while someone is in a health care facility, or someone who has recently taken antibiotics. These other infections include prostate and gallbladder infections, infections that appear after appendicitis and diverticulitis, wound infections including wounds made during surgery, pressure sore infections, foot infections in diabetics, pneumonia, bloodstream infections, and meningitis in newborns.