The French-Tunisian, who was a free agent after leaving Southend, has played in every game of Rangers' pre-season campaign on a trial basis.
The 26-year-old is not eligible to feature in a competitive game until September 1, when the Scottish League One club's transfer embargo expires.
He told RangersTV: "I'm very happy to sign for Rangers. I have agreed for two years and I think it is a chance to prove that I can play in the top league and be a part of the squad.
"It would be amazing to be one of the players who help Rangers back to where Rangers belongs."
Mohsni added: "It's a great squad with a great atmosphere so I've enjoyed it a lot because all of the players welcomed me very quickly.
"I felt like part of the squad from the first day so I've very happy to sign and stay with that team.
"Sometimes when you feel happy like that you play better and I felt that way from the first day so maybe that helped me decide to stay."
- Sports & Recreation