Ruts are difficuld because they require a different technique to flat corners or berms with a small slope. Steep berms can be tackled like giant ruts.
We all know that when we take on a small berms or flat corners we need to keep our body upright and 'tip' the bike into the turn. So while our bike is on an angle, our body is remaining upright. This, combined with weighting the outside peg, will place our weight down through the centre of the bike (when looking from above). You also need to be sitting on the outside edge of the seat. This is very important. Make a concious effort to keep your torso upright. If you get a friend to film you while doing this, you will be able to see if your tecnique is correct.
Anyway, about the ruts. They differ because unlike flat corners, you need to lean with the bike. This is beacuse when the tires are stuck in a rut, they have an edge to bite into, just like a really steep angled berm. The harder you hit the rut, the more centrifigul forces you apply to the biting edge of the tyre (which is the knobbies in the middle of the tyre in this case) and therefore more traction. So ruts are usally the fastest way around because you can really 'hammer' into them, but you need heaps of confidence.
But sandy ruts are harder again. In this case, you need to keep your weight slightly back or run the risk of blowing the rut out with the front wheel. This is best done by keeping your weight forward and using your shoulders to lean back. This way it is easy for you to lean back and fourth quickly to compensate for different reactions the bike may make. This is a very good tip, and can be used in all corners, especially hardpack. If you develop rear wheel spin when leaving a corner, leaning back will quickly provide traction for the back tyre. It all depends on how deep the rut is, but if we are talking quite deep ruts (shallow ruts can be seen as naturally made berms) then they should be very similar to hard pack ruts.
If you are having trouble in ruts, it might be because of the sensation a rut gives to the bike. You must not try to steer a bike through the rut, because you run the risk of popping a wheel out of the rut. Let the rut guide the bike through, and this can be difficuld to do.
As with all cornering in general, keep you wight well forward, your elbows up and out, chin up and over the cross bar. Use the door knob technique to controll the throttle, and of your elbows are indeed up and out, then this should come naturally. As you approch the apex of the corner, any corner rutted or flat, you need to TURN your head and LOOK to the exit of the corner. A general rule is to look two bike lengths ahead for each gear you are in, and even futher in gears above 3rd. This is what seperates a really good rider from a not so good one. You must keep your head up and look well ahead in front. This will ensure 1: you have ample time to plan your route and to look for dangerous objects you need to avoid to remain smooth. Very important when going down steep, rocky hills. This is probaly the best example of where looking ahead will give you enough time to plan your route.
2: It will keep your static balance in order. Just like a runner or bush walker needs to look forward to prevent getting dizzy and headaches, we too need to look up. 3: When everything is working, you do indeed 'go where you look'. And when things do go bad and you loose confidence, you again go where you look. Its usally straight towards a big rock or tree. So if you conciously look towards your exit, you will be there before you know it and thats a fantastic feeling.
Just to add a bit onto roostinbes post about braking. Most of your braking power will come from the front brake, but the back must not be neglected. Its easy on todays modern four stroke MXers to forget the back brake because of their great engine braking. But, using the back brake in conjunction with the front will stabilize the bike and cause the rear end to squat a bit. By pulling the rear end down, it will enable the rider to apply even more pressure to the front if needed. It is also good to set the bike up through a flat corner by using the back brake to slide to bike a bit before the corner. This will move the bike into the direction you are turning and make cornering a bit easier, but don't think its okay to powerslide through with the back wheel hanging out. Smooth is fast, and hanging the rear end isn't smooth. Really good riders do it, but they usally have the front wheel juuust braking traction, so they are actually drifting the bike through the turn. In these instances, the rider is using virtually ALL of the available traction, and therefore thats the fastest way around possible.