I suggest buying the following 2 books by Mitchell T. Yass, PHD PT
Over Power Pain and Pain Cure Rx.
My, my! You are so young and this is quite a challenge.
Please keep in mind, that despite your limitations and diagnosis, you can do many things to help lead a relatively healthy and good life.
I am a living example of this, having defied death twice, not only surviving 2 near fatal accidents, childhood anxiety,PTSD and more, but turning things around to the point of of reaching the best state of physical and mental health possible.
If you were to meet me today, you would not be able to detect anything wrong with me at all!
OK this post is more about you, so let's see...
Swimming (specially breaststroke) and gentle yoga are things that come to mind
to start. These would be the safest for flexibility, aerobic,
overall fitness and to a lesser degree for strength purposes.
Once your body gets accustomed to these forms of exercise, you can attempt to gradually try more advanced
levels in the above, but always under the guidance of a qualified instructor.
You may want to try power walking also, but please make sure whatever you do, you pay attention to your posture.
One exercise to help with posture is to stand against a wall and touch your buttocks and shoulder blades on the wall (or as close as possible) with your head and heels slightly away from the wall (feet 18" or so apart).
Hold it for a few minutes and repeat several times throughout the day.
See"Posture and the Alexander Technique" YouTube videos for many relevant exercises and details.
I wouldn't do any weight bearing training yet, till your body gets conditioned and only then you can try some easy body weight exercises (no added weights or machines).
In regards to management and treatment of AS, I would recommend you look into the effects of genetic and environmental factors in susceptibility to ankylosing spondylitis.
Genetic susceptibility to AS ( HLA-B27, HLA-B60, and HLA-DR1 typing) in combination with environmental triggers is rather pervasive , according to research literature.
The key is to optimize the variable/changeable environmental factors to your best possible advantage, since you can't change your genes.
Let me know if you need more details regarding the above.
Note that my suggestions do not constitute medical advice and are offered for educational and informational purposes only.
Yoga is excellent for back problems. You have to listen to your body and not let somebody push you to do moves your body says no to.
Look into taking turmeric. Golden paste is a recipe that has helped a lot of people with all sorts of pain and other conditions caused by inflammation.
Personal trainers at gyms are not physical therapists. They are not trained, usually, in rehab and health in any great detail -- they sometimes will have this training on their own, but then they'll probably leave the gym and go out on their own. Dr. Yass, as mentioned by Gymdandee, basically offers physical therapy, and believe me, I've had physical therapy up the yin yang. The problem with that is, it often makes you feel better as long as that's all you do, but when you return to doing what it is you really want to do the pain just eventually comes back again, but you do have the advantage when seeing one in person of having them look at you doing the exercise several times so you know you're doing it correctly. Usually, that takes some time to learn, and then is easy to unlearn. Meaning, there are a lot of different ways to do exercises and some will help you and some will not. The advice by the person recommending yoga is apt -- my first back problem came from doing yoga, so anything can become a problem if it doesn't suit you. Swimming can also be very stressful on the neck and shoulders, as I learned to my surprise since everyone always recommends it. Basically, nobody can tell you a workout that will suit you, so you're going to have to experiment and hopefully find someone who is an expert on movement to help you and show you. The gym might not turn out to be the best place for you, but don't feel bad if that's the case -- the longest living healthiest people being studied don't go to a gym, they just move regularly in their daily lives. Good luck finding what's fun for you.
By the way, when I first came on this website several years ago Gymdandee was having terrible back problems and wanting surgery. He wasn't able to get that surgery, but found a way back so that he's now at the gym five days a week. Of all of us, he's the one I'd talk to about rehabbing a back, though I don't think your problem is the one he had. You might try private messaging him about how he did it.
Paxiled is correct! My back problem isn't gone but with the correct exercises
and done at least 3x per week I have no problems. That's not to say i'm cured
I just keep the exercises going every week. If you can't get to a gym then in home body exercises without weights are done.