The two yokes on the shaft should be pointed the same way. So, if we went from the parking brake hub to the rear axle, the first joint you would set at vertical. The yoke attached to that, and the driveshaft, would be horizontal...the next set of cups would also be horizontal, then the final set attached to the diff would be vertical. The only way to alter this is to slide the driveshaft splines apart and slip it back together offset from where it should be. If you go 90 degrees out it will shake , as well as any other permutation that is not in line.
Some driveshafts only go together one way and on those you cannot get it wrong unless you break something or cut and weld. This applies to both front and rear shafts.
Here's a great Google find on driveshafts worth reading.
http://jniolon.clubfte.com/drivelinephasing/drivelinephasing.html