One good way to help prevent lower back and knee pain is to perform hip exercise & hip flexor exercises on a regular basis. Because your body works as a unit rather than separate parts, strengthening this core region will help to transfer many benefits to the rest of the lower body. By performing hip exercise & hip flexor exercises you will help ensure that your knees stay in alignment and that your lower back does not start overcompensating by handling much of the stress because the rest of the muscles are weak.
One very good hip exercise to perform is a cable pull through. To perform this, find the cable machine at your local gym and then attach the lower cable pulley hook. Look for a small rectangular shape wrap with two rings on either end and wrap this around the ankle, hooking the rings through the pulley clasp. Next, standing so that feet are shoulder width apart and there is just enough tension between you and the cable base that the chord is tight, slowly pull the leg closest to the cable across the body. You should feel this working up in the top of the inner thigh muscle. After performing a series of ten to fifteen of these, switch legs, turn around and repeat on the other side.
Next you will want to do the same movement only this time you will face in the other direction so that the foot attached to the cable is now on the outside of the body (so the free foot is closest to the cable base). Perform the movement by raising the leg in the outwards direction so it moves further away from the body. As this is the opposite action, you will now feel the tension of the muscles on the top of the outer thigh working.
Finally, again with the cable attached to the foot, stand so the back as facing the cable. Next you will take one foot and drive the knee upward to the chest while the other leg remains straight helping you maintain balance. This will really work the iliopsoas muscle (leg flexor) and get right to the core of this body area. Be particularly careful with this movement because these muscles tend to be slightly weaker and will not be able to handle as much weight.
After completing all three variations, perform some light stretching to help reduce muscular soreness.