If it’s just the tiny little flies that are called fruit flies, you can catch them in traps that have vinegar and water in them. They love vinegar and if you place small bottles or glasses with vinegar and water around the room, the flies are likely to be attracted to the vinegar and drown in the water.
Here is a recent thread started by our member Ellie from the Netherlands, where she gives a detailed description of how to get rid of fruit flies: https://binkybunny.com/FORUM/tabid/54/aft/167813/Default.aspx
If it’s the small flies that like to live in flower pots, there is some excess moisture in the pen or the room where the flies can thrive and hatch. Maybe look over what type of litter you use to try to pinpoint the origin of the flies.
Fruit flies won’t harm your bunny, they only like vinegar and ripe/over-ripe fruit. It’s not that type of flies that cause flystrike, flystrike is caused by green- and bluebottle flies.