It is possible that the main title of the report Ankylosing Spondylitis is not the name you expected. Please check the synonyms listing to find the alternate name(s) and disorder subdivision(s) covered by this report.
Pace yourself, especially if you haven't exercised for a while. Start slowly, and don't push yourself too hard. Then work your way up to where you can exercise for a longer time or do the exercise with more effort.
Manage pain. If your joint pain gets worse after exercise, try using ice on the joints that hurt. You may want to take an over-the-counter pain medicine before you exercise, such as acetaminophen (for example, Tylenol) or a nonsteroidal anti-inflammatory drug (NSAID) such as ibuprofen (for example, Advil or Motrin) or naproxen (for example, Aleve). Be safe with medicines. Read and follow all instructions on the label.
Rest your joints if they are swollen. For example, if your knees are swollen, don't use the stairs for a few days. Walk a shorter distance, and switch to swimming or riding an indoor bike.
Know when you have sore muscles and not joint pain. If your muscles are sore, you can safely exercise through the soreness. (You could exercise through joint pain too, but it's not safe to do so.)
If you have joint pain that lasts for more than a day after you exercise, you need to:
Rest the joint until your pain gets back to the level that is normal for you.