A topical foam pharmaceutical composition for rectal administration comprising rifaximin and a vehicle comprising a water soluble alkanol (alcohol) and water is described. Also described is a method of making the composition comprising: (1) heating a mixture of emulsifier and surfactant to form an oily phase (2) separately heating a mixture of a preservative and water (3) adding a water soluble alkanol to the preservative-water mixture and then mixing with oily phase of step (1) and (4) adding rifaximin to the mixture formed in step (3) and adjusting the pH to a desired value using a pH adjusting agent.and the use of the composition to as a medicament. Also disclosed is the use of such compositions in treating a disorder of therectum, colon, terminal ileum or anus.