Responses (3) Yes, Keflex (cephalexin ) can be used to treat urinary tract infections. yes however if you get frequent ones you may WHIS TO ASK FOR SUFAMETHAZONE it is a sulfer drug. As a chronic sufferer of UTIs since the age of six, I can say I've been on every antiobiotic and sulfa drug around. Keflex does knock out urinary infections, but like any antibiotic, it also wipes out your good bacteria in your gut as well. A year ago I discovered taking a high dose of vitamin C, 2.5 grams in the morning and at night, not only gets rid of an infection, but keeps them from coming back.