1. A pharmaceutical composition for topical rectal administration in the form of foam containing rifaximin.2. The composition of claim 1 further comprising an aqueous or nonaqueous medium.3. The composition of claim 2, wherein the non-aqueous carrier is one or more pharmaceutically acceptable alkanols one or more pharmaceutically acceptable vegetable oils or one or more pharmaceutically acceptable organic esters.4. The composition of claim 3, wherein the water soluble alkanol is ethanol propylene glycol glycerol polyethylene glycol polypropylene propylene glycol glyceryl ester or a mixture thereof.5. A composition according to claim 2, 3 or 4, wherein the carrier comprises a water-soluble alkanol and water, and wherein the weight ratio of water soluble alkanol to water is from 0.05: 10 to 10: 0.05.6. The composition of claim 1, wherein the carrier is from 10% by weight. % to 90 wt. of the total composition.7. The composition of claim 1, wherein the carrier comprises water in an amount of 20% by weight. % to 90 wt. of the total composition, and water soluble alkanol of from 0% by weight. % to 50 wt. of the total composition.8. The composition of claim 1, further comprising at least one surfactant.9. The composition of claim 8, wherein the surfactant is present in an amount of from 0.1 to 1.0% by weight. of the total composition.10. The composition of claim 1, further comprising at least one propellant.11. The composition of claim 10, wherein the propellant is present in an amount of from 0.5 to 20% by weight. of the total composition.12. The composition of claim 1, further comprising at least one solubilizer.13. The composition of claim 1, further comprising at least one emulsifier.14. The composition of claim 13, wherein the emulsifier is present in an amount of from 1 to 15% by weight. of the total composition.15. The composition of claim 1, further comprising at least one antioxidant.16. The composition of claim 1, further comprising at least one preservative.17.