How can I rehabilitate knees from past injury?

Straight leg raises. One o the easiest exercises for any knee pain is straight leg raises before you get out of bed in the morning and as soon as you get ini bed at night. While keeping your knee straight, raise and lower you foot while lying on your back. Alternate pointing and flexing your toes. It will do wonders. Obviously there are many more, but keep this in your regimen.
Knee Rehab. Depends on the specific problem and its effect on the rest of your kinetic chain. Any time you have an injury it effects local tissue as well as distant supportive tissue that cause a limb to act correctly as a kinetic unit. Rehab would be directed at correcting the local tissue issues as well as any subclinical alterations in remote area that may cause persistent deficits.