Hallux rigidus and hallux valgus are two totally different things that look different, have different causes and have different treatments.
Hallux rigidus is when the big toe (the hallux) joint is more rigid than it should be. As the joint gets stiffer it becomes more painful and affects the way you walk. The most common cause is osteoarthritis and is almost always painful. Treatment is typically directed at medications and injections for pain relief and the use of rocker shoes so that the shoe rocks and the joint does not have to bend as much. Surgery is often considered when the pain is difficult to manage.
Hallux valgus is when the big toe angles away from the mid line to the outside, pointing to the other toes (goes into valgus). It is initially generally not painful, but a large lump (a bunion) may form over the big toe joint and can become painful from arthritis like pain inside the joint and from shoe pressure on the lump. The most common cause is the use of tight fitting footwear in those with a genetic risk for them (ie family history). Treatment is usually the use of things like bunion correctors, exercises, pads and using better fitting footwear. If that fails to give satisfactory relief, then surgery can be a good option.