I agree with little Persia. Securing the ends is not as difficult or time consuming as reweaving a missing foundation repiling/ reknotting.
That is why reweaving a missing foundation at the sides or end of a rug (creating new warps and missing wefts and then repiling) is cost prohibitve unless the rug is more of a collector's piece and inherently rare. I hope I made that clear.
This is an antique piece, but not in good condition and not rare. For those reasons, costs of repairs for this rug are prohibitive and you would be better off finding one in good shape. If you want to use it in its current condition on the floor, get a good rug pad and secure the ends ... get the ends tied off so that no more knots roll off and keep the beater vacuum bar away from it. Professional rug repair will even off the rug on either end by removing all the knots on the ragged end to generate a straight line where the last row of knots are secured by a weft (foundation cord that runs from left to right between each row of knots) and then tie them off using a linen waxed thread that ties off @4 warps at a time, securing them tightly against the last weft. Tying off is not that hard to do, but creating a new foundation on which knots can be tied is difficult. This rug uses a symmetric or turkish knot and you have to know which is the bottom or top of the rug because that will determine the direction in which the knots should be tied.Smooth is from the top to the bottom, because that is way the knots were tied and hammered down. Run your hand across the rug from top to bottom and the direction of the pile will tell you which is the top or bottom of the rug. This is also why the rug has a dark side and a light side when looked at from either direction. One way reflects the light, the other absorbs it. The other difficulty in weaving or repiling is you have to get the right wool (2, 3 ply, ? ply), right color, and weft of the proper size. This is why reweaving and repiling/ knotting is so expensive. Sometimes little questions have big answers. Its fascinating stuff once you have been bitten/ smitten by the Rug Bug.