I have AS, it took me a year to figure out how to manage it. This is what i do to avoid flare ups and live mainly pain free.
1. Diet - no sugar, no alcohol, no caffeine, no preservatives, no starch (this is absolutely essential, you can go to kickas.org to learn more) Basically you need to go Paleo.
2. 35% Food Grade Hydrogen Peroxide drops in pure water x3 daily
3. Avoid trigger movements and scenarios, ( for me it involves not sitting on anything hard and no contact sport)
There is obviously so much more info. to manage AS but these 3 steps have dramatically changed my life. The main point is that you can completely control AS if you have the right knowledge and will power.
happy to discuss more if you're interested.
-d