The best advise is to avoid Los Angeles. Otherwise there are some options. The route through Los Angeles is the shortest. The 5/58/395/15/10 route is 16 miles longer, but all open highway driving, except near San Bernardino, but you can avoid that by taking the 210 through SB.
The route I like best, is 2 miles longer than going through L.A., but avoids some of the high desert freeways. I use 5/138/15/10. The downside is you have to climb the Grapevine. Otherwise 138 is a good 2-lane road, with mostly 4-lane east of Palmdale to San Bernardino County. And you get to drive through scenic Palmdale. Well, maybe not so scenic.