What is the treatment for ankylosing spondylitis that is best and has fewest side effects?

Depends. Ankylosing spondylitis (as) is an arthritis associated with a genetic tissue marker; hla-b27. It is treated depending upon the symptoms.Mild cases respond to nsaids especially indocin (indomethacin). More severe cases may require dmards (ask your rheumatologist). Regular exercise is helpful to prevent spinal stiffness. Eye inflamation and heart problems also are seen.
See below. All the therapies have side effects, but the only class of medications that give a chance for remission and stopping progression of the disease is tnf inhibitors.