I you just want a legal "cheat" you can block the paths with rocks. Rarely dose this seal the path completely but it can slow the undead enough to make an easily defendable position with just a few archers and swordsmen. 20 + 10 is enough to hold a position against several hundred undead without loss when you create enough of a blockage.
If the route remains open they will use it even if the get wiped out every time.