This medication is used to treat diarrhea caused by the common bacteria known as E. coli (“traveler’s diarrhea”). Rifaximin should not be used if you have a fever or bloody diarrhea. It works by stopping the growth of bacteria. This antibiotic treats only bacterial infections. It will not work for viral infections (such as common cold, flu). Using any antibiotic when it is not needed can cause it to not work for future infections. Rifaximin is also used to treat irritable bowel syndrome with diarrhea. It is also used to prevent a brain problem caused by liver disease (hepatic encephalopathy). It may help you think more clearly.