A lot of antibiotics work when the cell splits or does something with it's DNA or RNA, the antibiotic will try to interfere with this process. Rifaximin stops RNA synthesis of the bacteria, it can kill bacteria and it's broad spectrum. Rifaximin is only interesting because it has extremely low bioavailability, which is why it has so few side effects.
Rifaximin is not active against intracellular bacteria, it can't for example penetrate a macrophage where a bacteria is hiding, which is why it's not used for mycobacteria for example.
It's close ally, rifampicin, is effective against intracellular bacteria, but the flipside of the coin is that rifampicin has very high bioavailability and it acts in the whole body, which is why it also have more side effects than rifaximin. Rifampicin will be used against intracellular bacteria, it's used for TB and other mycobacteria etc.
Rifaximin is however effective against AIEC for example, but it creates a lot of resistance, but there's reason to use it for crohn's disease, since you can't keep using quinolones like cirpo for example, you can give rifaximin for years to people, you have to stop a quinolone after a few weeks or people get tendon issues and central nervous issues. That's why rifaximin is popular, because it has extremely low bioavailability, which means you can use it for extended periods of time without side effects.